I tried ShellExecute, but I get the same result.

The new EXE starts behind the application.

Any way for the new EXE to force itself to be in focus ?

I used to use this code in the main forms Init method:

Declare integer SetForegroundWindow in User32.dll Integer
SetForegroundWindow(this.HWnd)

But this is not working, maybe because I am on W7/64 computer ?

Thanks,
Kent
 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Eurico Chagas Filho
Sent: Friday, December 02, 2011 4:50 PM
To: ProFox Email List
Subject: Re: RUN an EXE 

I use ShellExecute(), perhaps u should consider it...

HTH, E.




>________________________________
> From: Kent Belan <[email protected]>
>To: 'ProFox Email List' <[email protected]>
>Sent: Friday, December 2, 2011 7:37 PM
>Subject: RUN an EXE
> 
>Hello,
>
>Hope you don't mind if I have another question for today.
>
>I have an application that one of the menu options starts a new VFP9 
>application.
>
>So in the click event, the code looks like:
>RUN /N NEWAPP.EXE
>
>This works fine except the new NEWAPP.EXE starts up behind the existing 
>application.
>
>I tried to remove the /N from the run command, and it does work better, 
>but leaves a command window hanging ...
>
>How can I get NEWAPP.EXE to open as the active application ?
>
>Thanks,
>Kent
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/680A3129991F4B7BB37E76A0F248ED97@LaptopW7
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to