Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the state of the window
Message
 
 
To
17/01/2001 11:03:31
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexico
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00464683
Message ID:
00464715
Views:
16
Add to your function:
#define SW_MAXIMIZE 3
#define SW_NORMAL 1
declare integer ShowWindow in user32 integer lnhWnd, integer lncmdshow

ShowWindow(hwndNext,SW_NORMAL)
HTH.

>I downloaded this code here from UT:
>
>*********************************
>FUNCTION AppInstance
>PARAMETERS WindowName
>
>#DEFINE GW_OWNER 4
>#DEFINE GW_HWNDFIRST 0
>#DEFINE GW_HWNDNEXT 2
>DECLARE integer SetForegroundWindow in win32api long lnhWnd
>DECLARE integer GetWindowText in win32api integer, string, integer
>DECLARE integer GetWindow in win32api integer,INTEGER
>DECLARE integer IsWindowVisible in win32api integer
>DECLARE integer GetActiveWindow in win32api
>IsWindEx = .F.
>if len(WindowName) < 1
> return .t.
>endif
>foxhwnd = GetActiveWindow()
>hwndNext = GetWindow(foxhwnd,GW_HWNDFIRST)
>DO WHILE hwndNext <> 0
> IF (hwndnext <> foxhwnd .AND. GetWindow(hwndnext,GW_OWNER) = 0)
> Stuffer = SPACE(64)
> x = GetWindowText(hwndnext,@Stuffer,64)
> IF WindowName $ Stuffer
> IsWindEx = .T.
> =SetForegroundWindow(hwndnext)
> EXIT
> ENDIF
> ENDIF
> hwndNext = GetWindow(hwndnext,GW_HWNDNEXT)
>ENDDO
>
>RETURN IsWindEx
>************************
>
>It works perfectly, but if the window is minimized how can i bringing it up to its normal state?
>
>Thanks in advance
>Héctor L.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform