Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Posts
    57

    Trouble with enabling buttons

    I want to enable buttons once the first button is pushed. I write a registry key so that if the application is launched again, it will enable all the buttons. I am setting and getting proper values in the registry, but for some reason, I cannot set the buttons to enabled from reading the registry. Here is the code on the first button:

    Audio.Stop(CHANNEL_BACKGROUND)
    File.OpenURL("http://forums.docsoft.com", SW_SHOWNORMAL);
    Button.SetEnabled("adobe", true);
    Button.SetEnabled("install", true);
    Button.SetEnabled("documentation", true);
    Button.SetEnabled("website", true);
    Registry.SetValue(HKEY_CURRENT_USER, "Software\\DocSoft Quick.SVG Autorun", "Registered", "EnableBtns", REG_SZ);

    Here is the start up code:

    registry_value = Registry.GetValue(HKEY_CURRENT_USER, "Software\\DocSoft Quick.SVG Autorun", "Registered", true);
    Dialog.Message("Registry Data", "The value read from the Registry is "..registry_value..".");
    if (registry_value == "EnableBtns") then
    Dialog.Message("Set Enabled", "Button state IS true");
    Button.SetVisible("adobe", true);
    Button.SetEnabled("adobe", true);
    Button.SetEnabled("install", true);
    Button.SetEnabled("documentation", true);
    Button.SetEnabled("website", true);
    end

    Any ideas?

    Thanks,

    Kurt

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Kurt,

    Is your startup code, placed on the On Show or On Preload events for the page that contains the buttons?

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Join Date
    Jun 2002
    Posts
    57
    It is placed in the On Startup event.

  4. #4
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Quote Originally Posted by kmartin7
    It is placed in the On Startup event.
    Try placing the code on the On Preload event for the page. See if that works.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. i love buttons !
    By noonmoon in forum AutoPlay Media Studio 5.0
    Replies: 8
    Last Post: 01-15-2010, 05:05 AM
  2. SWF Buttons / Actions
    By Florian Loeffler in forum AutoPlay Media Studio 5.0
    Replies: 5
    Last Post: 04-28-2004, 12:26 AM
  3. Linking buttons with files (or something like that)
    By feilong in forum AutoPlay Media Studio 4.0
    Replies: 8
    Last Post: 11-19-2002, 03:47 PM
  4. hidden buttons briefly visible
    By cchian in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 01-21-2002, 06:31 PM
  5. Page Preview and buttons ?
    By RAZS in forum AutoPlay Menu Studio 3.0
    Replies: 2
    Last Post: 12-13-2001, 01:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts