Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Could someone try turning this code from VB into VFP.
Message
From
11/12/2000 22:00:44
 
 
To
09/12/2000 11:37:52
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00451166
Message ID:
00452005
Views:
23
>============= VB Coding =========
>
>Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
DECLARE INTEGER SendMessage IN USER32 INTEGER, INTEGER, INTEGER, INTEGER
>
>Const WM_NCLBUTTONDOWN = &HA1
#DEFINE WM_NCLBUTTONDOWN 0xA1
>Const HTCAPTION = 2
#DEFINE HTCAPTION 2
>
>lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
VFP6 does not provide an hWnd to the form as a native property; you can get it via FOXTOOLS or any pf several possible API calls. The VFP7 beta release provides an hWnd for the form as a native property. If you know a form is the active window, GetActiveWindow() is about as simple a call as you can use:
* In Form1 somewhere when you know the form is on top and active
DECLARE INTEGER GetActiveWindow IN WIN32API
IF TYPE('thisform.hWnd') = 'U'
   thisform.ADDPROPERTY('hWnd')
ENDIF
thisform.hWnd = GetActiveWindow()
You may find VFP's treatment of non-client regions of a form to be different than VB's.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform