Open a project using a command button from another project
-
27 martie 2012 05:45
I have a number of independent visual basic applications. Now I want to develop a window that will have command buttons to open each of the applications. How do I write the code in these buttons?
Funflex
- Mutat de Esther FanMicrosoft Employee, Moderator 23 aprilie 2012 00:55 (From:Visual Studio Class Designer)
Toate mesajele
-
28 martie 2012 08:02Moderator
Hi Funflex,
Welcome to the MSDN forum.
You can open the VB application with the help of thread class: http://msdn.microsoft.com/en-us/library/system.threading.thread.aspx
Here is a sample about open the Cmd.exe in VB.net:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim proc As New Process 'Change the path to the VB.Net exe file. proc.StartInfo.FileName = "C:\Windows\System32\cmd.exe" Try proc.Start() Catch ex As Exception MessageBox.Show(ex.Message) End Try End SubYou can try to change the file name of the VB file you want to open.
Hope it helps.
Mark Liu-lxf [MSFT]
MSDN Community Support | Feedback to us
- Marcat ca răspuns de Mark Liu-lxfModerator 5 aprilie 2012 06:42
-
5 aprilie 2012 06:42Moderator
Hi Funflex,
We haven’t heard from you for several days. I’d like to mark my reply as answer firstly. If you have any additional questions, you also can unmark the replay and post your question here.
Sorry for any inconvenience and have a nice day.
Mark Liu-lxf [MSFT]
MSDN Community Support | Feedback to us