Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FoxPro on top of other windows?

Status
Not open for further replies.

Kimed

Programmer
May 25, 2005
104
LT
Hi,

I need a VFP application working as an OLE server for an Excel sheet. The problem is that if it needs to show an user form or to throw a messagebox, they don't always pop up on *top* of Excel and can't be accessed then. The worst part is that even if I know that the VFP app is waiting for input right now, I can't minimize Excel to reach it, since Excel won't take events until the app returns control to it (well, an user form can be selected from the taskbar, but messageboxes can't). How can I make the called application always show on top of other programs?

Thanks.
 
1. Messagebox has an undocumented parameter 4096.

Two undocumented additional MESSAGEBOX() parameters values exist. These are:

#DEFINE MB_SYSTEMMODAL 4096
#DEFINE MB_TASKMODAL 8192

Adding these values to the other values controlling the icon and button style will effect the modality level or scope of the dialog. While MB_SYSTEMMODAL has little noticable effect on the dialog (there are internal differences, however), MB_TASKMODAL will cause the dialog to appear on top of not only the windows in the current application, but all other windows and applications.

(from George Tasker)

2. You may also check this article
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top