PDA

View Full Version : Problem On Button ...


mustafa06
01-30-2008, 07:59 AM
Code - Dosent work :huh

nChoice = Dialog.Message("Notice", "Your message here.", MB_OKCANCEL,

MB_ICONINFORMATION, MB_DEFBUTTON1);
if nChoice == true then
Application.Exit(0);
elseif nChoice == false then
Label.SetEnabled("Gun", true);
end


End -

holtgrewe
01-30-2008, 08:34 AM
Dialog.Message returns a 'number' instead of a boolean.
instead of testing 'true', test for a '1' or use the constant 'IDOK'.


nChoice = Dialog.Message("Notice", "Your message here.", MB_OKCANCEL,

MB_ICONINFORMATION, MB_DEFBUTTON1);
if nChoice == true then
Application.Exit(0);
elseif nChoice == false then
Label.SetEnabled("Gun", true);
end


if nChoice == IDOK then

hth

mustafa06
01-30-2008, 08:37 AM
Dialog.Message returns a 'number' instead of a boolean.
instead of testing 'true', test for a '1' or use the constant 'IDOK'.





if nChoice == IDOK then

hth

ty to man ;) :yes