Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralDock two forms Pin
Guinness4Strength27-May-04 11:41
Guinness4Strength27-May-04 11:41 
GeneralRe: Dock two forms Pin
Heath Stewart27-May-04 12:27
protectorHeath Stewart27-May-04 12:27 
GeneralRe: Dock two forms Pin
Guinness4Strength27-May-04 19:19
Guinness4Strength27-May-04 19:19 
GeneralRe: Dock two forms Pin
Dave Kreskowiak28-May-04 1:21
mveDave Kreskowiak28-May-04 1:21 
GeneralRe: Dock two forms Pin
Guinness4Strength28-May-04 3:16
Guinness4Strength28-May-04 3:16 
GeneralRe: Dock two forms Pin
Heath Stewart30-May-04 6:06
protectorHeath Stewart30-May-04 6:06 
GeneralRe: Dock two forms Pin
Guinness4Strength1-Jun-04 6:45
Guinness4Strength1-Jun-04 6:45 
GeneralRe: Dock two forms Pin
Heath Stewart1-Jun-04 6:50
protectorHeath Stewart1-Jun-04 6:50 
First, you need to make sure that the variable does not go out of scope and that you have a message pump attached to the Form, otherwise it will be closed when the thread terminates (FYI, Application.Run does this with your main form). The easiest way is to call Form.ShowDialog, but don't forget to dispose the form (i.e., call Dispose) when ShowDialog returns and (if you need to) you get all information from it before disposing it. There are other ways, and reading through the System.Windows.Forms namespace in the .NET Framework SDK at some of the more obscure classes should help if you have experience with native Win32 programming with Windows APIs.

One thing to keep in mind is that you will need to use Control.Invoke to communicate between to controls (i.e., Forms) created on different threads. Also, controls created on different threads cannot be hosted in the same container (which doesn't apply here, but I thought I'd mention it anyway).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Dock two forms Pin
Guinness4Strength1-Jun-04 7:09
Guinness4Strength1-Jun-04 7:09 
GeneralRe: Dock two forms Pin
Heath Stewart1-Jun-04 8:45
protectorHeath Stewart1-Jun-04 8:45 
GeneralOn-Screen Keyboard Pin
raki100427-May-04 11:03
raki100427-May-04 11:03 
GeneralVSPackage load failure after incorporating a PLK for the vspackage. Pin
ManSus27-May-04 10:38
ManSus27-May-04 10:38 
QuestionHow do I copy a file and display progress? Pin
Tony Archer27-May-04 10:35
Tony Archer27-May-04 10:35 
AnswerRe: How do I copy a file and display progress? Pin
Guinness4Strength27-May-04 11:42
Guinness4Strength27-May-04 11:42 
AnswerRe: How do I copy a file and display progress? Pin
Dave Kreskowiak27-May-04 11:43
mveDave Kreskowiak27-May-04 11:43 
GeneralRe: How do I copy a file and display progress? Pin
Jonathan Slenders28-May-04 0:28
Jonathan Slenders28-May-04 0:28 
GeneralRe: wsdl converter Pin
mjmcinto27-May-04 10:12
mjmcinto27-May-04 10:12 
GeneralDataTable.Select and Expressions Pin
rog103927-May-04 9:18
rog103927-May-04 9:18 
GeneralRe: DataTable.Select and Expressions Pin
Heath Stewart27-May-04 10:03
protectorHeath Stewart27-May-04 10:03 
GeneralRe: DataTable.Select and Expressions Pin
rog103927-May-04 10:26
rog103927-May-04 10:26 
GeneralDataset XML Diff Pin
MrJJKoolJ27-May-04 8:42
MrJJKoolJ27-May-04 8:42 
GeneralRe: Dataset XML Diff Pin
Dave Kreskowiak27-May-04 9:50
mveDave Kreskowiak27-May-04 9:50 
GeneralInserting SQLSever rows Pin
ABean27-May-04 8:41
ABean27-May-04 8:41 
GeneralRe: Inserting SQLSever rows Pin
Heath Stewart27-May-04 10:01
protectorHeath Stewart27-May-04 10:01 
GeneralRe: Inserting SQLSever rows Pin
Andy Brummer27-May-04 10:07
sitebuilderAndy Brummer27-May-04 10:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.