I'm working on a new bot but when I try to evoke the click it presents me the error
The value of '0' is not valid for 'index'. 'index' should be between 0 and -1.
I have tried several ways to click on the respective butao but the butao has no name just color so I tried this way to click on the butao but no matter how much I change my code or not the error and also does not work or so when I try this new way it always presents me with this error. This is my buttao on the page that I'm trying to do the automatic click
Well, I've tried several ways, but it does not seem to work the last test was executed with this code but I continue without success
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Dim theElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("B5")
For Each currentElement As HtmlElement In theElements
If currentElement.GetAttribute("id").Equals("B5") Then
currentElement.InvokeMember("click")
End If
Next
End Sub
<button type="submit" name="B5" style="height: 20; background-color: #FFFF00; width:20" onclick="submitform(2);"></button>
This is my code
Imports System.Runtime.InteropServices
Imports System.IO
Public Class Form1
Dim horas As Integer
Dim minutos As Integer
Dim segundos As Integer
Dim milesimos As Integer
Dim ratobutao
Dim tipoclick
Dim repetir
Dim currentelocal
Dim xmouse
Dim ymouse
Dim timerop
Dim WithEvents htmldoc As HtmlDocument
Declare Sub mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32)
<DllImport("user32.dll")>
Public Shared Function GetAsyncKeyState(ByVal vKey As Int32) As UShort
End Function
Private Sub htmldoc_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs) Handles htmldoc.MouseMove
'TextBox5.Text = e.MousePosition.X.ToString
'TextBox6.Text = e.MousePosition.Y.ToString
'xmouse = e.MousePosition.X.ToString
'ymouse = e.MousePosition.Y.ToString
End Sub
Private Sub htmldoc_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs) Handles htmldoc.MouseDown
xmouse = Control.MousePosition.X.ToString()
ymouse = Control.MousePosition.Y.ToString()
TextBox5.Text = xmouse
TextBox6.Text = ymouse
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer2.Start()
WebBrowser1.Navigate("www.google.com")
For Each c As Control In Controls
AddHandler c.MouseClick, AddressOf ClickHandler
Next
If TextBox1.Text = "" Then
TextBox1.Text = "0"
End If
If TextBox2.Text = "" Then
TextBox2.Text = "0"
End If
If TextBox3.Text = "" Then
TextBox3.Text = "5"
End If
If TextBox4.Text = "" Then
TextBox4.Text = "0"
End If
End Sub
Private Sub ClickHandler(sender As Object, e As MouseEventArgs) Handles Me.MouseClick
Select Case e.Button
Case MouseButtons.Left
MsgBox("left mouse")
TextBox5.Text = xmouse
TextBox6.Text = ymouse
Label2.Text = "Left"
Case MouseButtons.Right
Label2.Text = "Right"
Case MouseButtons.Middle
Label2.Text = "Middle"
Case Else
Label2.Text = "Some other button"
End Select
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
htmldoc = WebBrowser1.Document
WebBrowser1.ScriptErrorsSuppressed = True
WebBrowser1.Document.Forms(0).InvokeMember("click")
'WebBrowser1.Document.Forms(0).InvokeMember("submit")
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelemet As HtmlElement In allelements
If webpageelemet.GetAttribute("value") = "button" Then
webpageelemet.InvokeMember("click")
End If
Next
End Sub
Public Sub WriteToErrorLog(ByVal msg As String, _
ByVal stkTrace As String, ByVal title As String)
If Not System.IO.Directory.Exists(Application.StartupPath &
"\Errors\") Then
System.IO.Directory.CreateDirectory(Application.StartupPath &
"\Errors\")
End If
'check the file
Dim fs As FileStream = New FileStream(Application.StartupPath &
"\Errors\errlog.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite)
Dim s As StreamWriter = New StreamWriter(fs)
s.Close()
fs.Close()
'log it
Dim fs1 As FileStream = New FileStream(Application.StartupPath &
"\Errors\errlog.txt", FileMode.Append, FileAccess.Write)
Dim s1 As StreamWriter = New StreamWriter(fs1)
s1.Write("Title: " & title & vbCrLf)
s1.Write("Message: " & msg & vbCrLf)
s1.Write("StackTrace: " & stkTrace & vbCrLf)
s1.Write("Date/Time: " & DateTime.Now.ToString() & vbCrLf)
s1.Write("================================================" & vbCrLf)
s1.Close()
fs1.Close()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
xmouse = Control.MousePosition.X.ToString()
ymouse = Control.MousePosition.Y.ToString()
TextBox5.Text = xmouse
TextBox6.Text = ymouse
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
'Timer1.Interval = 1000
segundos = segundos - 1
TextBox9.Text = segundos
'TextBox3.Text = segundos
If TextBox9.Text <= 0 Then
Windows.Forms.Cursor.Position = New Point(xmouse, ymouse)
Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)
mouse_event(&H2, 0, 0, 0, 1)
mouse_event(&H4, 0, 0, 0, 1)
segundos = TextBox3.Text
'Timer1.Stop()
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
segundos = TextBox3.Text
Timer1.Start()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
segundos = TextBox3.Text
Timer1.Stop()
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
TextBox8.Text = DateTime.Now.ToString("HH:mm:ss tt")
If Label1.Text = "{ENTER}" Then
Button1.PerformClick()
Label1.Text = ""
End If
If (GetAsyncKeyState(&H6E) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "."
ElseIf (GetAsyncKeyState(&H67) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "7"
ElseIf (GetAsyncKeyState(&H68) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "8"
ElseIf (GetAsyncKeyState(&H69) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "9"
ElseIf (GetAsyncKeyState(&H64) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "4"
ElseIf (GetAsyncKeyState(&H66) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "6"
ElseIf (GetAsyncKeyState(&H61) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "1"
ElseIf (GetAsyncKeyState(&H62) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "2"
ElseIf (GetAsyncKeyState(&H63) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "3"
ElseIf (GetAsyncKeyState(&H60) And My.Computer.Keyboard.NumLock) Then
Label1.Text = "0"
ElseIf (GetAsyncKeyState(&H51) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "Q"
ElseIf (GetAsyncKeyState(&H57) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "W"
ElseIf (GetAsyncKeyState(&H45) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "E"
ElseIf (GetAsyncKeyState(&H52) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "R"
ElseIf (GetAsyncKeyState(&H54) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "T"
ElseIf (GetAsyncKeyState(&H59) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "Y"
ElseIf (GetAsyncKeyState(&H55) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "U"
ElseIf (GetAsyncKeyState(&H49) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "I"
ElseIf (GetAsyncKeyState(&H4F) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "O"
ElseIf (GetAsyncKeyState(&H50) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "P"
ElseIf (GetAsyncKeyState(&H41) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "A"
ElseIf (GetAsyncKeyState(&H53) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "S"
ElseIf (GetAsyncKeyState(&H44) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "D"
ElseIf (GetAsyncKeyState(&H46) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "F"
ElseIf (GetAsyncKeyState(&H47) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "G"
ElseIf (GetAsyncKeyState(&H48) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "H"
ElseIf (GetAsyncKeyState(&H4A) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "J"
ElseIf (GetAsyncKeyState(&H4B) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "K"
ElseIf (GetAsyncKeyState(&H4C) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "L"
ElseIf (GetAsyncKeyState(&H5A) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "Z"
ElseIf (GetAsyncKeyState(&H58) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "X"
ElseIf (GetAsyncKeyState(&H43) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "C"
ElseIf (GetAsyncKeyState(&H56) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "V"
ElseIf (GetAsyncKeyState(&H42) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "B"
ElseIf (GetAsyncKeyState(&H4E) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "N"
ElseIf (GetAsyncKeyState(&H4D) And My.Computer.Keyboard.CapsLock) Then
Label1.Text = "M"
ElseIf (GetAsyncKeyState(&HC0) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "~"
ElseIf (GetAsyncKeyState(&H31) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "!"
ElseIf (GetAsyncKeyState(&H32) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "@"
ElseIf (GetAsyncKeyState(&H33) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "#"
ElseIf (GetAsyncKeyState(&H34) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "$"
ElseIf (GetAsyncKeyState(&H35) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "%"
ElseIf (GetAsyncKeyState(&H36) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "^"
ElseIf (GetAsyncKeyState(&H37) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "&"
ElseIf (GetAsyncKeyState(&H38) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "*"
ElseIf (GetAsyncKeyState(&H39) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "("
ElseIf (GetAsyncKeyState(&H30) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = ")"
ElseIf (GetAsyncKeyState(&HBD) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "_"
ElseIf (GetAsyncKeyState(&HBB) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "+"
ElseIf (GetAsyncKeyState(&H51) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "Q"
ElseIf (GetAsyncKeyState(&H57) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "W"
ElseIf (GetAsyncKeyState(&H45) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "E"
ElseIf (GetAsyncKeyState(&H52) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "R"
ElseIf (GetAsyncKeyState(&H54) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "T"
ElseIf (GetAsyncKeyState(&H59) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "Y"
ElseIf (GetAsyncKeyState(&H55) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "U"
ElseIf (GetAsyncKeyState(&H49) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "I"
ElseIf (GetAsyncKeyState(&H4F) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "O"
ElseIf (GetAsyncKeyState(&H50) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "P"
ElseIf (GetAsyncKeyState(&HDB) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "{"
ElseIf (GetAsyncKeyState(&HDD) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "}"
ElseIf (GetAsyncKeyState(&HDC) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "|"
ElseIf (GetAsyncKeyState(&H41) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "A"
ElseIf (GetAsyncKeyState(&H53) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "S"
ElseIf (GetAsyncKeyState(&H44) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "D"
ElseIf (GetAsyncKeyState(&H46) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "F"
ElseIf (GetAsyncKeyState(&H47) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "G"
ElseIf (GetAsyncKeyState(&H48) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "H"
ElseIf (GetAsyncKeyState(&H4A) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "J"
ElseIf (GetAsyncKeyState(&H4B) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "K"
ElseIf (GetAsyncKeyState(&H4C) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "L"
ElseIf (GetAsyncKeyState(&HBA) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = ":"
ElseIf (GetAsyncKeyState(&HDE) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = """"
ElseIf (GetAsyncKeyState(&H5A) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "Z"
ElseIf (GetAsyncKeyState(&H58) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "X"
ElseIf (GetAsyncKeyState(&H43) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "C"
ElseIf (GetAsyncKeyState(&H56) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "V"
ElseIf (GetAsyncKeyState(&H42) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "B"
ElseIf (GetAsyncKeyState(&H4E) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "N"
ElseIf (GetAsyncKeyState(&H4D) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "M"
ElseIf (GetAsyncKeyState(&HBC) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "<,"
ElseIf (GetAsyncKeyState(&HBE) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = ">"
ElseIf (GetAsyncKeyState(&HBF) And My.Computer.Keyboard.ShiftKeyDown) Then
Label1.Text = "?"
ElseIf GetAsyncKeyState(&H1B) Then
Label1.Text = "{ESCAPE}"
ElseIf GetAsyncKeyState(&H70) Then
Label1.Text = "{F1}"
ElseIf GetAsyncKeyState(&H71) Then
Label1.Text = "{F2}"
ElseIf GetAsyncKeyState(&H72) Then
Label1.Text = "{F3}"
ElseIf GetAsyncKeyState(&H73) Then
Label1.Text = "{F4}"
ElseIf GetAsyncKeyState(&H74) Then
Label1.Text = "{F5}"
ElseIf GetAsyncKeyState(&H75) Then
Label1.Text = "{F6}"
ElseIf GetAsyncKeyState(&H76) Then
Label1.Text = "{F7}"
ElseIf GetAsyncKeyState(&H77) Then
Label1.Text = "{F8}"
ElseIf GetAsyncKeyState(&H78) Then
Label1.Text = "{F9}"
ElseIf GetAsyncKeyState(&H79) Then
Label1.Text = "{F10}"
ElseIf GetAsyncKeyState(&H7A) Then
Label1.Text = "{F11}"
ElseIf GetAsyncKeyState(&H7B) Then
Label1.Text = "{F12}"
ElseIf GetAsyncKeyState(&H2C) Then
Label1.Text = "{PRTSC}"
ElseIf GetAsyncKeyState(&H13) Then
Label1.Text = "{BREAK}"
ElseIf GetAsyncKeyState(&H2D) Then
Label1.Text = "{INS}"
ElseIf GetAsyncKeyState(&H2E) Then
Label1.Text = "{DEL}"
ElseIf GetAsyncKeyState(&HC0) Then
Label1.Text = "'"
ElseIf GetAsyncKeyState(&H31) Then
Label1.Text = "1"
ElseIf GetAsyncKeyState(&H32) Then
Label1.Text = "2"
ElseIf GetAsyncKeyState(&H33) Then
Label1.Text = "3"
ElseIf GetAsyncKeyState(&H34) Then
Label1.Text = "4"
ElseIf GetAsyncKeyState(&H35) Then
Label1.Text = "5"
ElseIf GetAsyncKeyState(&H36) Then
Label1.Text = "6"
ElseIf GetAsyncKeyState(&H37) Then
Label1.Text = "7"
ElseIf GetAsyncKeyState(&H38) Then
Label1.Text = "8"
ElseIf GetAsyncKeyState(&H39) Then
Label1.Text = "9"
ElseIf GetAsyncKeyState(&H30) Then
Label1.Text = "0"
ElseIf GetAsyncKeyState(&HBD) Then
Label1.Text = "-"
ElseIf GetAsyncKeyState(&HBB) Then
Label1.Text = "="
ElseIf GetAsyncKeyState(&H8) Then
Label1.Text = "{BACKSPACE}"
ElseIf GetAsyncKeyState(&H9) Then
Label1.Text = "{TAB}"
ElseIf GetAsyncKeyState(&H51) Then
Label1.Text = "q"
ElseIf GetAsyncKeyState(&H57) Then
Label1.Text = "w"
ElseIf GetAsyncKeyState(&H45) Then
Label1.Text = "e"
ElseIf GetAsyncKeyState(&H52) Then
Label1.Text = "r"
ElseIf GetAsyncKeyState(&H54) Then
Label1.Text = "t"
ElseIf GetAsyncKeyState(&H59) Then
Label1.Text = "y"
ElseIf GetAsyncKeyState(&H55) Then
Label1.Text = "u"
ElseIf GetAsyncKeyState(&H49) Then
Label1.Text = "i"
ElseIf GetAsyncKeyState(&H4F) Then
Label1.Text = "o"
ElseIf GetAsyncKeyState(&H50) Then
Label1.Text = "p"
ElseIf GetAsyncKeyState(&HDB) Then
Label1.Text = "["
ElseIf GetAsyncKeyState(&HDD) Then
Label1.Text = "]"
ElseIf GetAsyncKeyState(&HDC) Then
Label1.Text = "\"
ElseIf GetAsyncKeyState(&H14) Then
Label1.Text = "{CAPSLOCK}"
ElseIf GetAsyncKeyState(&H41) Then
Label1.Text = "a"
ElseIf GetAsyncKeyState(&H53) Then
Label1.Text = "s"
ElseIf GetAsyncKeyState(&H44) Then
Label1.Text = "d"
ElseIf GetAsyncKeyState(&H46) Then
Label1.Text = "f"
ElseIf GetAsyncKeyState(&H47) Then
Label1.Text = "g"
ElseIf GetAsyncKeyState(&H48) Then
Label1.Text = "h"
ElseIf GetAsyncKeyState(&H4A) Then
Label1.Text = "j"
ElseIf GetAsyncKeyState(&H4B) Then
Label1.Text = "k"
ElseIf GetAsyncKeyState(&H4C) Then
Label1.Text = "l"
ElseIf GetAsyncKeyState(&HBA) Then
Label1.Text = ";"
ElseIf GetAsyncKeyState(&HDE) Then
Label1.Text = "'"
ElseIf GetAsyncKeyState(&HD) Then
Label1.Text = "{ENTER}"
ElseIf GetAsyncKeyState(&H5A) Then
Label1.Text = "z"
ElseIf GetAsyncKeyState(&H58) Then
Label1.Text = "x"
ElseIf GetAsyncKeyState(&H43) Then
Label1.Text = "c"
ElseIf GetAsyncKeyState(&H56) Then
Label1.Text = "v"
ElseIf GetAsyncKeyState(&H42) Then
Label1.Text = "b"
ElseIf GetAsyncKeyState(&H4E) Then
Label1.Text = "n"
ElseIf GetAsyncKeyState(&H4D) Then
Label1.Text = "m"
ElseIf GetAsyncKeyState(&HBC) Then
Label1.Text = ","
ElseIf GetAsyncKeyState(&HBE) Then
Label1.Text = "."
ElseIf GetAsyncKeyState(&HBF) Then
Label1.Text = "/"
ElseIf GetAsyncKeyState(&HA2) Then
Label1.Text = "^"
ElseIf GetAsyncKeyState(&H12) Then
Label1.Text = "%"
ElseIf GetAsyncKeyState(&H20) Then
Label1.Text = "{SPACE}"
ElseIf GetAsyncKeyState(&HA3) Then
Label1.Text = "^"
ElseIf GetAsyncKeyState(&H25) Then
Label1.Text = "{LEFT}"
ElseIf GetAsyncKeyState(&H26) Then
Label1.Text = "{UP}"
ElseIf GetAsyncKeyState(&H27) Then
Label1.Text = "{RIGHT}"
ElseIf GetAsyncKeyState(&H28) Then
Label1.Text = "{DOWN}"
ElseIf GetAsyncKeyState(&H90) Then
Label1.Text = "{NUMLOCK}"
ElseIf GetAsyncKeyState(&H6F) Then
Label1.Text = "{DIVIDE}"
ElseIf GetAsyncKeyState(&H6A) Then
Label1.Text = "{MULTIPLY}"
ElseIf GetAsyncKeyState(&H6E) Then
Label1.Text = "{DELETE}"
ElseIf GetAsyncKeyState(&H6B) Then
Label1.Text = "{ADD}"
ElseIf GetAsyncKeyState(&H6D) Then
Label1.Text = "{SUBTRACT}"
ElseIf GetAsyncKeyState(&H24) Then
Label1.Text = "{HOME}"
ElseIf GetAsyncKeyState(&H68) Then
Label1.Text = "{UP}"
ElseIf GetAsyncKeyState(&H21) Then
Label1.Text = "{PGUP}"
ElseIf GetAsyncKeyState(&H64) Then
Label1.Text = "{LEFT}"
ElseIf GetAsyncKeyState(&H65) Then
Label1.Text = "5"
ElseIf GetAsyncKeyState(&H66) Then
Label1.Text = "{RIGHT}"
ElseIf GetAsyncKeyState(&H23) Then
Label1.Text = "{END}"
ElseIf GetAsyncKeyState(&H62) Then
Label1.Text = "{DOWN}"
ElseIf GetAsyncKeyState(&H22) Then
Label1.Text = "{PGDN}"
ElseIf GetAsyncKeyState(&H60) Then
Label1.Text = "{INSERT}"
ElseIf GetAsyncKeyState(&H1) Then
Label1.Text = "{L Mouse Down}"
ElseIf GetAsyncKeyState(&H2) Then
Label1.Text = "{R Mouse Down}"
ElseIf GetAsyncKeyState(&H4) Then
Label1.Text = "{M Mouse Down}"
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
WebBrowser1.Navigate(TextBox7.Text)
If TextBox7.Text = "" Then
WebBrowser1.Navigate("site_link")
End If
End Sub
End Class