Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a VFP Window to be on top of all other windows
Message
From
28/03/2000 14:29:44
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Getting a VFP Window to be on top of all other windows
Miscellaneous
Thread ID:
00351538
Message ID:
00351538
Views:
44
I am writing an application in VFP 6.0 to run on WinNT workstations. My app runs "behind the scenes" in that it reads a text file created by another app, does a bunch of verifications and returns a pop-up window (the only part of my app that's visible) to the end user letting them know if the text file is valid or not. I have the following code in my app to call a form window, but it doesn't return focus to my form. I would like the user to be able to hit the Enter key when they see the form to close my form and return focus to the other application. As it stands right now, the user has to click on the "OK" button to close my form.

Code in frmMessage.init:
***********************************
lparameters cText, cTitle
local lnHandle

DECLARE INTEGER ShowWindow IN WIN32API INTEGER hWnd, INTEGER ShowWindowMode
DECLARE INTEGER GetActiveWindow IN WIN32API

lnHandle = FindWindow(0, 'frmMessageForm')

=ShowWindow(GetActiveWindow(),5)

this.caption = cTitle
thisform.txtMessageText.caption = cText
thisform.cmdOK.setfocus
***********************************

Any ideas on how I can get my form to be the active window on my screen?

Thanks,

Joe
Next
Reply
Map
View

Click here to load this message in the networking platform