943,519 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 3469
  • VB.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Mar 21st, 2005
0

More Questions

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JBD2 is offline Offline
24 posts
since Mar 2005
Mar 21st, 2005
0

Re: More Questions

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
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
cpopham is offline Offline
65 posts
since Mar 2005
Mar 21st, 2005
0

Re: More Questions

Can you describe the "sub-main procedure" to me? Sorry, I'm a noob.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JBD2 is offline Offline
24 posts
since Mar 2005
Mar 22nd, 2005
0

Re: More Questions

Quote 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
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
cpopham is offline Offline
65 posts
since Mar 2005
Mar 22nd, 2005
0

Re: More Questions

Thanks, but one more thing..."Now enter your code" which code is that? Like the code that opens both of them or what? Thanks.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JBD2 is offline Offline
24 posts
since Mar 2005
Mar 22nd, 2005
0

Re: More Questions

Quote 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.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Mar 22nd, 2005
0

Re: More Questions

Quote ...
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JBD2 is offline Offline
24 posts
since Mar 2005
Mar 22nd, 2005
0

Re: More Questions

Since you are in VB.Net The System.Diagnostics namespace exposes a Process class:

VB.NET Syntax (Toggle Plain Text)
  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.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Mar 22nd, 2005
0

Re: More Questions

There are more ways than one to accomplish what you want....

Chester
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
cpopham is offline Offline
65 posts
since Mar 2005
Mar 22nd, 2005
0

Re: More Questions

Ya I thought I'd look at both of them and see what one I thought would be easier.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JBD2 is offline Offline
24 posts
since Mar 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Counting text in a field
Next Thread in VB.NET Forum Timeline: I need help..urgently





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC