Re: Unable to kill application by Pulkit
Pulkit
Wed May 09 23:24:01 CDT 2007
I dont have a window class name for my window since its made in C# i m using
second argument, title, but it didnt work. anyways i have solved the issue.
Thanks for the reply though
"r_z_aret@pen_fact.com" wrote:
> On Wed, 9 May 2007 02:11:01 -0700, Pulkit
> <Pulkit@discussions.microsoft.com> wrote:
>
> >I am writiing an application in c# targeting window mobile 5.0. The project
>
> I don't know C#, so I'll answer "in" straight Win32 and hope it
> translates well enough.
>
>
> >consists of one application(lets call it main) which needs to start another
> >application. I do this using process class. this part works fine. Now when my
> >other application starts, i need to hide it. i do that using this.hide(). Now
>
> I'm pretty sure a window handle remains valid as long as the target
> window exists. Have you tried saving the handle you use to hide the
> app, and using it later to send a WM_CLOSE message?
>
>
> >I need to kill this applicatiion from my main application. which I am unable
> >to do. process.kill, process.close, process.closemainwindowhandle all fail.
> >Even the findwindow and destroywindow doesnt work, since findwindow cannot
> >find my window since its hidden. How can I kill my application from my main
>
> Are you using the first or second argument of FindWindow? I _think_
> the first argument (window class name) works even if the window is
> hidden. But you need to assign a class name to the target window when
> you create it.
>
> Does the application you're trying to kill handle WM_CLOSE messages?
>
>
> >application. Please suggest
> >Thanks and regars
> >Pulkit Sethi
>
> -----------------------------------------
> To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
>
> Robert E. Zaret, eMVP
> PenFact, Inc.
> 20 Park Plaza, Suite 478
> Boston, MA 02116
> www.penfact.com
>