Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Minimize Window API Function?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00203054
Message ID:
00203077
Views:
18
>Hi!
>
>I am trying to minimize a running application: I am sure that there is an API call that can do this.
>
>I want to:
>1. Find the window - I know the calls for this
>2. Minimize the window
>
>Does anyone know the function and its signature (parameters and their types), or even better the DECLARE statement to call from VFP?
>
>Thanks,

Hi Rick,

ShowWindow() with do want you want. Here's the necessary info
#define SW_HIDE             0
#define SW_SHOWNORMAL       1
#define SW_NORMAL           1
#define SW_SHOWMINIMIZED    2
#define SW_SHOWMAXIMIZED    3
#define SW_MAXIMIZE         3
#define SW_SHOWNOACTIVATE   4
#define SW_SHOW             5
#define SW_MINIMIZE         6
#define SW_SHOWMINNOACTIVE  7
#define SW_SHOWNA           8
#define SW_RESTORE          9
#define SW_SHOWDEFAULT      10
#define SW_FORCEMINIMIZE    11
#define SW_MAX              11
DECLARE INTEGER ShowWindow IN Win32API;
  INTEGER hWnd, INTEGER nCmdShow
The first parameter is the window handle. The second should be one of the values shown in the defines.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform