Joshua
02-16-2005, 03:57 AM
I have set the default radio button within a project to CTRL_RADIO_BUTTON_01, but I want to know how I can set it based on a registry lookup value. This may meen that it is button 1 or button 11 as the default.
So far I have the following:
ON STARTUP
NoRegistryMidi = true;
RegMidi = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Company\\Product\\1.0", "Midi", true);
if (RegMidi ~= "") then
NoRegistryMidi = false;
if (RegMidi == "name of midi 1") then
DefaultMidi = 1;
end
if (RegMidi == "name of midi 2") then
DefaultMidi = 2;
end
end
If the test represented button 2 as being used last time the user run the program, then I would like to set the CTRL_RADIO_BUTTON_02 as the default on the radio buttons screen.
Thanks
Joshua
So far I have the following:
ON STARTUP
NoRegistryMidi = true;
RegMidi = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Company\\Product\\1.0", "Midi", true);
if (RegMidi ~= "") then
NoRegistryMidi = false;
if (RegMidi == "name of midi 1") then
DefaultMidi = 1;
end
if (RegMidi == "name of midi 2") then
DefaultMidi = 2;
end
end
If the test represented button 2 as being used last time the user run the program, then I would like to set the CTRL_RADIO_BUTTON_02 as the default on the radio buttons screen.
Thanks
Joshua