Re: Use Running App

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
>


.



Relevant Pages

  • Re: Use Running App
    ... code leverages Process.GetProcessesByNamemethod to determine if there ... p/invokes Win32 api ShowWindowAsync to post a show-window event to the ... The first parameter passed to ShowWindowAsync API is the window we want to ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Use Running App
    ... > Hi Brian, ... > p/invokes Win32 api ShowWindowAsync to post a show-window event to the ... > message queue of the previous process' main window. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Relationships. Does anyone use them?
    ... When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. ... Over time I'd go into the window and see relationship spaghetti....tables/queries all overthe place with lots of relationship lines between here and there. ... Fewer than a blue moon. ...
    (comp.databases.ms-access)
  • Re: Relationships. Does anyone use them?
    ... salad wrote: ... When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. ... Over time I'd go into the window and see relationship spaghetti....tables/queries all overthe place with lots of relationship lines between here and there. ...
    (comp.databases.ms-access)