Autor Tema: Ajuda Firefox .....  (Leído 1895 veces)

0 Usuarios y 1 Visitante están viendo este tema.

hall9000

  • Bytes
  • *
  • Mensajes: 12
  • Reputación: +0/-0
    • Ver Perfil
Ajuda Firefox .....
« 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 ....

Código: [Seleccionar]
   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