Windows Develop Bookmark and Share   
 index > Windows Forms General > combining multiple applications into 1 form
 

combining multiple applications into 1 form

i have 4winforms apps. i want to combine them into 1 launch pad. how can i create amultitabbed form that can launch different appsinits own application space. in the sence that each app launched will have its app.config etc that it will execute under.
dilibu  Wednesday, January 21, 2009 11:08 AM
Let's say that you have 2 applications:
C:\Apps\app1.exe
C:\Apps\app1.exe.config
C:\Apps\app2.exe
C:\Apps\app2.exe.config

You can create buttons to start those applications by creating them and adding the following Button.Click event handlers:

usingSystem.Diagnostics;
privatevoidbtnStartApp1_Click(objectsender,EventArgse)
{
Processapp1=newProcess();
app1.StartInfo.FileName=@"C:\Apps\app1.exe";
//app1.StartInfo.Arguments="arg1";ifyouneedtopassargumentstoexe.
app1.Start();
}
privatevoidbtnStartApp2_Click(objectsender,EventArgse)
{
Processapp2=newProcess();
app2.StartInfo.FileName=@"C:\Apps\app2.exe";
//app2.StartInfo.Arguments="arg1";ifyouneedtopassargumentstoexe.
app2.Start();
}


Tomi Airaksinen - MCPD [Remember to click "mark as answered" when you get a correct reply to your question]
  • Marked As Answer bydilibu Wednesday, January 21, 2009 2:42 PM
  •  
Tomi Airaksinen  Wednesday, January 21, 2009 11:18 AM
Let's say that you have 2 applications:
C:\Apps\app1.exe
C:\Apps\app1.exe.config
C:\Apps\app2.exe
C:\Apps\app2.exe.config

You can create buttons to start those applications by creating them and adding the following Button.Click event handlers:

usingSystem.Diagnostics;
privatevoidbtnStartApp1_Click(objectsender,EventArgse)
{
Processapp1=newProcess();
app1.StartInfo.FileName=@"C:\Apps\app1.exe";
//app1.StartInfo.Arguments="arg1";ifyouneedtopassargumentstoexe.
app1.Start();
}
privatevoidbtnStartApp2_Click(objectsender,EventArgse)
{
Processapp2=newProcess();
app2.StartInfo.FileName=@"C:\Apps\app2.exe";
//app2.StartInfo.Arguments="arg1";ifyouneedtopassargumentstoexe.
app2.Start();
}


Tomi Airaksinen - MCPD [Remember to click "mark as answered" when you get a correct reply to your question]
  • Marked As Answer bydilibu Wednesday, January 21, 2009 2:42 PM
  •  
Tomi Airaksinen  Wednesday, January 21, 2009 11:18 AM
You cannot put the window of another process inside a tab page, the SDK documentation strictly forbids it. The SetParent() API function has some appcompat hacks that may work for you. Or not.
Hans Passant.
nobugz  Wednesday, January 21, 2009 1:39 PM

You can use google to search for other answers

Custom Search

More Threads

• Toolstrip color problem when upgrading app from 1.1 to 2.0
• Problem pasting text in certain apps
• using Microsoft UIP Application Block
• Adding nodes in AfterLabelEdit event handler of treeview control
• WebBrowser cursor place
• Count messages in MSMQ
• MaskedTextBox and Currency
• Threading Again.. No Redirects pretty please
• ComboBox list(simple question)
• Implementing Cut, Copy, Paste, in a Menu