Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB HELP!
Message
From
20/05/1999 19:46:45
 
 
To
20/05/1999 18:58:11
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00221197
Message ID:
00221206
Views:
28
>Could someone try turning this code from VB into VFP.

Best I could do, without knowing what WebBrowser1 is? I assume it is instantiated in the form?

Also, don't know how to translate SendKeys...
#DECLARE GW_CHILD 5
#DECLARE GWL_STYLE (-16)
#DECLARE WS_VSCROLL &H200000

Declare Long GetWindow Lib "user32" Long hwnd, Long wCmd
Declare Long GetWindowLong Lib "user32" As "GetWindowLongA" Long hwnd, Long nIndex
Declare Long SetFocusAPI Lib "user32" As "SetFocus" Long hwnd
Declare Long GetFocus Lib "user32"
Declare Long SendMessage Lib "user32" As "SendMessageA" Long hwnd, Long wMsg, Long wParam, Long lParam

local hwnd

WebBrowser1.SetFocus
hwnd = GetFocus
SetFocusToBrowser (hwnd)
SendKeys "^P" 'Control-P to print
End Sub


FUNCTION SetFocusToBrowser(hBrowserHwnd)
Local lStyle, ;
	lResult,;
	hwnd
hwnd = hBrowserHwnd
Do While (lResult = 0) And (hwnd <> 0)
	hwnd = GetWindow(hwnd, GW_CHILD)
	lStyle = GetWindowLong(hwnd, GWL_STYLE)
	lResult = lStyle And WS_VSCROLL
EndDo
SetFocusAPI (hwnd)
EndFunc
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform