More Questions

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2005
Posts: 24
Reputation: JBD2 is an unknown quantity at this point 
Solved Threads: 0
JBD2 JBD2 is offline Offline
Newbie Poster

More Questions

 
0
  #1
Mar 21st, 2005
Could I make two programs, but with one icon/startup so that when you click the icon, it runs both programs?

Thats my first question.

My other question is for something else, how can I make something delete files? Thanks.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 65
Reputation: cpopham is an unknown quantity at this point 
Solved Threads: 0
cpopham cpopham is offline Offline
Junior Poster in Training

Re: More Questions

 
0
  #2
Mar 21st, 2005
First Question:
Yes you can do that. You would need to use the sub main procedure. The sub main is usually used for things like a splash screen, but you could use it to start two seperate threads.

Second Question:
You would need to import file IO, but yes you can delete a file or files.

Chester
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 24
Reputation: JBD2 is an unknown quantity at this point 
Solved Threads: 0
JBD2 JBD2 is offline Offline
Newbie Poster

Re: More Questions

 
0
  #3
Mar 21st, 2005
Can you describe the "sub-main procedure" to me? Sorry, I'm a noob.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 65
Reputation: cpopham is an unknown quantity at this point 
Solved Threads: 0
cpopham cpopham is offline Offline
Junior Poster in Training

Re: More Questions

 
0
  #4
Mar 22nd, 2005
Originally Posted by JBD2
Can you describe the "sub-main procedure" to me? Sorry, I'm a noob.

Right Click on your project and the click Add New Item
Click Module
Name your Module
Open the new Module
Between the Module Header and Footer, type Sub Main() and enter
Now enter your code.

On the Solution Explorer right click and click on your settings, under startup, click Sub Main.

Hope this helps.

Chester
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 24
Reputation: JBD2 is an unknown quantity at this point 
Solved Threads: 0
JBD2 JBD2 is offline Offline
Newbie Poster

Re: More Questions

 
0
  #5
Mar 22nd, 2005
Thanks, but one more thing..."Now enter your code" which code is that? Like the code that opens both of them or what? Thanks.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: More Questions

 
0
  #6
Mar 22nd, 2005
Originally Posted by JBD2
Thanks, but one more thing..."Now enter your code" which code is that? Like the code that opens both of them or what? Thanks.
Yes, it would be the code to launch each program. I actually think what he was trying to do is to have your project load two forms, instead of two exe's. You could just as easily have 1 of your exe's launch your other EXE on form load.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 24
Reputation: JBD2 is an unknown quantity at this point 
Solved Threads: 0
JBD2 JBD2 is offline Offline
Newbie Poster

Re: More Questions

 
0
  #7
Mar 22nd, 2005
You could just as easily have 1 of your exe's launch your other EXE on form load.
So how would I do this method?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: More Questions

 
0
  #8
Mar 22nd, 2005
Since you are in VB.Net The System.Diagnostics namespace exposes a Process class:

  1. Dim myProcess As Process = System.Diagnostics.Process.Start("c:\somepath\somefile.exe")

obviously, you will need to change "c:\somepath\somefile.exe" to the path of the program that you want to launch (in this case, your other program). That should effectively launch the exe. Now, just stick that in your form load... and whenever EXE 1 runs, it will launch EXE2 by default.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 65
Reputation: cpopham is an unknown quantity at this point 
Solved Threads: 0
cpopham cpopham is offline Offline
Junior Poster in Training

Re: More Questions

 
0
  #9
Mar 22nd, 2005
There are more ways than one to accomplish what you want....

Chester
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 24
Reputation: JBD2 is an unknown quantity at this point 
Solved Threads: 0
JBD2 JBD2 is offline Offline
Newbie Poster

Re: More Questions

 
0
  #10
Mar 22nd, 2005
Ya I thought I'd look at both of them and see what one I thought would be easier.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC