Visual Basic Foro
Programación => Visual Basic 6 => Mensaje iniciado por: hall9000 en Octubre 12, 2011, 09:27:11 pm
-
hola estoy haciendo un programa que pone un formulario en el navegador de informar a un mensaje para que firefox no acepta
puesto en marcha en las páginas de carga de Firefox sólo tiene una clase MozillaWindowClass estoy usando el api FindWindowEx gracias ....
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, _
ByVal hWndNewParent As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Public Function fire() As Long
dim FF ,janelaFF, hWndFF as long
FF = GetForegroundWindow
janelaFF = FF
hWndFF = FindWindowEx(janelaFF, 0, ("MozillaWindowClass"), vbNullString)
hWndFF = FindWindowEx(hWndFF, 0, ("MozillaWindowClass"), vbNullString)
fire = hWndFF
End Function
Private Sub Timer1_Timer()
dim ms as long
ms = fire
If ms <> "0" Then
SetParent Form2.hwnd, fire
MsgBox "mensaje"
Form2.show
end if
End Sub