4 Replies - 270 Views - Last Post: 28 January 2012 - 06:05 PM Rate Topic: -----

Topic Sponsor:

#1 Madd Jack  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-January 12

Trying to code check boxs and button

Posted 27 January 2012 - 06:53 PM

Hello all, I am a do it yourself kind of guy and hate to ask for help. But it seems I have met my match with VB coding. I am sure the answers are out there, but I lack the knowledge of keywords to find my answers. I'll explaing what I'm trying to design this for first and then tell you where I'm stuck.

I install alot of software on alot of computers. So what I want is to put all my software on a USB stick. And make an application with check boxs that I check what I want to install all at once by a single install button. I know the shell command to point the check box to my setup file but it runs it as soon as I check the box.

My questions are what is the code to make the check box wait untill I click the single install button? And what is the code for the install button to run all the boxs I have checked?

And to make it look pretty I want to place to progress bars in the application one for current process and one for overall completion. What would be the code for this?

Thank you for any assistance.

Is This A Good Question/Topic? 0
  • +

Replies To: Trying to code check boxs and button

#2 Madd Jack  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-January 12

Re: Trying to code check boxs and button

Posted 27 January 2012 - 08:46 PM

Ha Ha, I am gaining on it here is what I found to work so far.

In the "Install Button" properties I put this code in


If CheckBox10.Checked = "true" Then Shell("c:\windows\notepad.exe")




Run the application and check the checkbox10, click the install button and it opens my Notepad. Still have to figure the code to make each checked box wait it's turn for the previous to complete and the progress bars code. But I'm having fun so far.
Was This Post Helpful? 0
  • +
  • -

#3 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 211
  • View blog
  • Posts: 1,249
  • Joined: 26-March 09

Re: Trying to code check boxs and button

Posted 28 January 2012 - 12:32 AM

Sounds like you had your code in the Checkbox click event originally.

You shouldn't need to use the Checkbox click event in this application, unless you want to turn options on/off based on a click (for example, if you Check "WinZip", you might want to disable "WinRar" and viceversa).

You want to test the state of all the check boxes in the "Install" button click event.

In regards to waiting for completion before executing, then that gets a little more complicated and involves some API's (as far as I'm aware, you can't do it using just the shell command - I'm sure someone will correct me if I'm wrong).

Have a look at this link for an example of a function that will Shell to an application and wait for it to complete....it be what you're looking for.

This post has been edited by maj3091: 28 January 2012 - 12:32 AM

Was This Post Helpful? 0
  • +
  • -

#4 Madd Jack  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-January 12

Re: Trying to code check boxs and button

Posted 28 January 2012 - 06:49 AM

Well it appears I have come to a halt. When I try this shell command with the .exe files on my USB Stick It comes back with File Not Found error. I know the path is correct and pointing at the application file.
Was This Post Helpful? 0
  • +
  • -

#5 Madd Jack  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-January 12

Re: Trying to code check boxs and button

Posted 28 January 2012 - 06:05 PM

Ok I have figured it out. I'll post for the people of the future trying to do this.


If CheckBox10.Checked = "true" Then Process.Start("G:\Folder\*****.exe")




So it is the Process.Start statement and not Shell that will start an install from a Flash Drive.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1