PDA

View Full Version : Check box with command button


Lyria Syndoh
01-09-2007, 05:39 PM
Hello

I am newbie to this app.

I want to create a list of applications with check boxes and a command button.

When the command button is clicked all the checked items should run one after another. How to do that?

RizlaUK
01-09-2007, 08:33 PM
well, to start you would need to download these, checkbox and/or radio buttons
http://www.indigorose.com/forums/showthread.php?t=13124&highlight=radio

make the buttons toggle buttons in the button settings and use the command "Button.GetState" to check weather the button is checked and use File.Run to install the file, set the wait for return to true to make the app wait for the file to install b4 installing the next file

eg: you would use this code for each button (or check box)
isBtn1Checked = Button.GetState(Button1);
if isBtn1Checked == 1 then
result = File.Run("AutoPlay\\Docs\\MyProg.exe", "", "", SW_SHOWNORMAL,true);
end


you would need to edit the code to suit your needs, ie button name and file path and chacge isBtn(button number here)Checked

hope it helps

RizlaUK
01-09-2007, 09:03 PM
sorry for the double post guys but the edit button seems to have dissapeard (or im just so tired i cant see it)

Lyria, i forgot to mention that you would put that code in your command button and use label objects next to the check boxes so the user knows what checkbox installs what program,

again.....hope it helps

Lyria Syndoh
01-10-2007, 04:31 PM
Thank you very much RizlaUK
I am gonna try your nice suggestion.