Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why doesn't my Top-Level Form gets focus?
Message
 
 
To
12/02/2001 04:15:30
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00474894
Message ID:
00474917
Views:
21
Check out this KB article at msdn.microsoft.com

Q195516 - HOWTO: Make a Form a Topmost Window Using APIs

You need to make use of the Windows API. First, you need to get the handle of the for. Then, using the handle, you make the form the top-most form - thereby getting focus....

< JVP >



>I'm having a small problem in a project which consist of only one form which is set to be top-level. Everything works alright except for the fact when I run the project the form don't get the focus until I click on it. Why is that?
>
>In my project I have a main.prg which is the first thing to run and which has the following code:
>
>
>CLEAR
>CLEAR ALL
>CLOSE ALL
>
>_SCREEN.VISIBLE	= .F.
>
>** Make sure that the program is working in the right directory.
>SET DEFAULT TO (JUSTPATH(FULLPATH(SYS(16))))
>
>** Opens any classlibs or procedure files that are needed.
>SET LIBRARY TO focus ADDITIVE
>SET PROCEDURE TO odclutils ADDITIVE
>
>** Start the main form.
>DO FORM myform
>READ EVENTS
>
>
>What shall I do so that my form gets the focus directly when running the project?
Previous
Reply
Map
View

Click here to load this message in the networking platform