Re: Use Running App
- From: "Brian P. Hammer" <BrianHammer@xxxxxxxxxxxxxxxx>
- Date: Mon, 14 Nov 2005 20:40:37 -0600
Jeffery - Beginners pains....
My issue was Application.Run(new MDIMain). I declared frmMDI outside of the
procedure and just call Application.Run(frmMDI) if it is the first app or
just pass my data to frmMDI.SoProcedure...
Thanks for sticking with me.
Regards,
Brian
""Jeffrey Tan[MSFT]"" <v-jetan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:clHMYAY6FHA.1236@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi Brian,
>
> Thanks for your feedback.
>
> Actually, I am not sure of what is the problem you are real facing. Bob's
> code leverages Process.GetProcessesByName() method to determine if there
> are more than 1 process in the system has the same name as your
> application, if so, there must be a previous application running. So it
> p/invokes Win32 api ShowWindowAsync to post a show-window event to the
> message queue of the previous process' main window.
>
> The first parameter passed to ShowWindowAsync API is the window we want to
> active, which we obtained through RunningProcesses[0].MainWindowHandle,
> that is Process.MainWindowHandle property(you can search this in MSDN for
> more information).
>
> Does this make this process clear? If you have any more concern, please
> feel free to tell us, thanks
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>
.
- References:
- Use Running App
- From: Brian P. Hammer
- Re: Use Running App
- From: Brian P. Hammer
- Re: Use Running App
- From: "Jeffrey Tan[MSFT]"
- Re: Use Running App
- From: Bob Powell [MVP]
- Re: Use Running App
- From: "Jeffrey Tan[MSFT]"
- Use Running App
- Prev by Date: RE: Hierarchical structure in config file?
- Next by Date: Re: Transparent label flicker when drawn on form
- Previous by thread: Re: Use Running App
- Next by thread: Re: Use Running App
- Index(es):
Relevant Pages
|