Microsoft KB Archive/134447

How to Hide the Desktop in Visual FoxPro

PSS ID Number: Q134447 Article last modified on 08-20-1995

3.00

WINDOWS

= SUMMARY =

Using the FindWindow and ShowWindow API calls from within Windows, the main Visual FoxPro desktop can be hidden and recalled on demand. This article shows by example how to do it.

= MORE INFORMATION =

The following code demonstrates how to hide and display the main FoxPro desktop.

Sample Code
-


 * This function manipulates the main Visual FoxPro window.
 * This function may be called in the Load Event of a form that
 * has these properties: WindowType = Modal, AlwaysOnTop = True,
 * and DeskTop = True ************************************************************** #DEFINE W32sDLL “W32SCOMB.DLL” #DEFINE W32DLL “USER32.DLL” IF “3.5” $ OS OR “Windows 4” $ OS && cDLL = W32DLL ELSE cDLL = W32sDLL ENDIF

DECLARE integer FindWindow IN &cDLL integer, string DECLARE Integer ShowWindow IN &cDLL Integer, Integer

SW_MAXIMIZE = 3 SW_SHOWNORMAL = 1 SW_SHOWMINIMIZED = 2 SW_SHOWGONE = 0

NullPointer = 0 FoxHWND = FindWindow(NullPointer, _SCREEN.Caption)


 * Hide the Main Visual FoxPro Window FoxGone = ShowWindow(FoxHWND, SW_SHOWGONE)

=MessageBox(“Visual FoxPro Desktop is hidden…”)

FoxGone = ShowWindow(m.FoxHWND, SW_SHOWNORMAL)

Additional reference words: VFoxWin 3.00 Command window Hide Desktop KBCategory: kbprg kbcode KBSubcategory: FxprgUdwindow

=
================================================================

Copyright Microsoft Corporation 1995.