Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6: Minimize a top level app
Message
From
13/11/2001 03:17:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00579279
Message ID:
00580763
Views:
19
>>>I have a top level form EXE and I want to run it from another VFP app and have it minimized. I am running: run /n2 MYAPP.EXE and it isn't being minimized. Any ideas?
>>>TIA!
>>
>>David,
>>Use shellexecute.
>>
>>
#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 long ShellExecute in "shell32.dll" ;
>>	long hwnd, string lpszOp, ;
>>	string lpszFile, string lpszParams, ;
>>    string lpszDir, long nShowCmd
>>
>>ShellExecute(0,'open','c:\mypath\myapp.exe',0,0,SW_SHOWMINIMIZED)
Cetin
>
>I tried this and it doesn't work on either of my applications. They are top-level apps with a minimized button activated. I even tried sending a parameter to the EXE to set the WindowState in the Init and that hasn't worked.

Check offending code in app. You can try this on a well-known executing such as winword.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform