Quantcast
Viewing all articles
Browse latest Browse all 27044

Stop Button

Well I'm making this application (a bot) and I don't want to sound like a skid or anything but I have a code and I'd like to create two things:

A stop button:

This is the code already present:
Imports System.Threading

Public Class Form1
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
Private Declare Function GetDC Lib "user32" (ByVal hWnd As IntPtr) As IntPtr
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As IntPtr, ByVal X As Int32, ByVal Y As Int32) As Int32
Dim hDC As IntPtr
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim hWnd As IntPtr = FindWindow(String.Empty, "Nitto Legends (Beta)")
hDC = GetDC(hWnd)
Do Until GetPixel(hDC, 366, 202) = 13693949
Loop
Thread.Sleep(Textbox1.Text)
SendKeys.SendWait("{Up}")
End Sub

End Class

And I'd like to make a stop button to stop that. Someone suggested to me using a loop but I just can't find any tutorials for this similar issue.

And I would also like to create a hotkey.

Thank you in advance.

Viewing all articles
Browse latest Browse all 27044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>