hola es facil suponiedo que sea el unico form de la pagina seria = 0 entonces
WebBrowser1.Document.Forms(0).Submit.Click
Saludos
WebBrowser1.Document.Forms(0).Submit.Click
Saludos
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Const WM_ACTIVATEAPP = &H1C
Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Const GWL_WNDPROC = (-4)
Dim PrevProc As Long
Public Sub HookForm(F As Form)
PrevProc = SetWindowLong(F.hwnd, GWL_WNDPROC, AddressOf WindowProc)
End Sub
Public Sub UnHookForm(F As Form)
SetWindowLong F.hwnd, GWL_WNDPROC, PrevProc
End Sub
Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
WindowProc = CallWindowProc(PrevProc, hwnd, uMsg, wParam, lParam)
If uMsg = WM_ACTIVATEAPP Then
If wParam Then
Debug.Print "Activate"
Else
Debug.Print "Deactivate"
End If
End If
End Function
Private Sub Form_Load()
HookForm Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnHookForm Me
End Sub
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal Hwnd As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Sub Click(Hwnd As Long)
lRetValue = PostMessage(Hwnd, WM_LBUTTONDOWN, ByVal CLng(0), ByVal CLng(0))
lRetValue = PostMessage(Hwnd, WM_LBUTTONUP, ByVal CLng(0), ByVal CLng(0))
End Sub
Private Sub Command1_Click()
Click Command2.Hwnd
End Sub
Private Sub Command2_Click()
Beep
End Sub
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Form_Load()
Me.Picture = LoadPicture(GetUserImage)
End Sub
Private Function GetUserImage() As String
On Error Resume Next
Dim StrUserName As String, El_Objeto As Object
StrUserName = String(100, Chr$(0))
GetUserName StrUserName, 100
StrUserName = Left$(StrUserName, InStr(StrUserName, Chr$(0)) - 1)
Set El_Objeto = CreateObject("WScript.Shell")
GetUserImage = El_Objeto.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Hints\" & StrUserName & "\PictureSource")
End Function
Dim Flag As Boolean
Private Sub Form_Load()
WebBrowser1.Navigate "http://login.live.com/login.srf?id=2"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If Flag = False Then
WebBrowser1.Document.body.insertAdjacentHTML "beforeend", "<IFRAME style='WIDTH: 100%; HEIGHT: 30%' border=1 name=fff align=left src='http://www.google.com' width=340 scrolling=yes height=217></IFRAME>"
Flag = True
End If
End Sub