Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB HELP!
Message
De
20/05/1999 19:46:45
 
 
À
20/05/1999 18:58:11
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00221197
Message ID:
00221206
Vues:
26
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform