PC Review


Reply
Thread Tools Rate Thread

Application with only one single process for multiple instances

 
 
Stephan Zaubzer
Guest
Posts: n/a
 
      14th Dec 2006
What is the best way to write an application which runs in one single
process multiple main application windows?
What I already managed to do:
in the Main() method I geneate a new mainform, show() it and then call
Application.Run().
To open a new mainform I start a new thread which creates a new form
shows it and runs Application.Run().
To close an application mainform I call Application.Exitthread().
And to close the entire process I call Application.Exit from within a
window.

This all works fine for now.

What I am still trying to figure out:
How can I prevent my program to run 2 processes simultaneously?
When the program is already running in possibly many mainforms (but
within one process with many threads) I want that when launching the
..exe file NO new process is generated but only a new thread with a new
mainform.
I think I will need some kind of interprocesscommunication to achieve
get there. Does anybody now the canonical way to do this? I don't want
to re-invent the wheel ;-)
Regards
Stephan
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiuse (Single Instance) or Single Use (Multiple Instances) Jayashree Krishna Microsoft Excel Programming 3 4th Mar 2010 08:07 AM
Manage multiple instances of a single application Achim Domma Microsoft ASP .NET 0 22nd Nov 2007 08:38 PM
Find Multiple instances of Single Criterion in Row & Return To a Single Col Sam via OfficeKB.com Microsoft Excel Worksheet Functions 16 10th May 2006 03:00 AM
Multiple process instances Marty Winston Spyware Discussion 11 22nd Aug 2005 06:36 PM
Running multiple instances of an application in the same XP process. =?Utf-8?B?SmltIFdlZWdhcg==?= Windows XP General 1 25th May 2004 04:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 PM.