Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form not active
Message
From
11/10/2006 12:03:56
 
 
To
09/10/2006 06:38:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01160481
Message ID:
01161230
Views:
13
>I have a top-level login form I have setted _SCREEN.VISIBLE = .F. in form's init event and revert it when OK button clicked. My problem is when I want to run my program then login form is displayed but inactive, I have to click init to active it. I tried with SCREEN = OFF but same. Any one have idea about this?

Try this code to force window activation via Windows API
DECLARE INTEGER ShowWindow IN WIN32API AS APIShowWindow  ; 
    LONG HWND, LONG nCmdShow 
DECLARE INTEGER BringWindowToTop IN WIN32API AS APIBringWindowToTop ; 
        LONG HWND 

APIShowWindow(ThisForm.HWnd, 9)
APIBringWindowToTop(ThisForm.HWnd)

CLEAR DLLS APIShowWindow  
CLEAR DLLS APIBringWindowToTop
HTH
/A new technology turns into completely outdated stuff before you have a time to read "Getting Started..." section.
/If there are some "system programmers" then others are unsystematic.
Previous
Reply
Map
View

Click here to load this message in the networking platform