![]() ![]() Private Sub Form1_click(ByVal sender As System.Object, ByVal e As ) Handles MyBase.MouseClick Dim g As Graphics = Me.CreateGraphics g.DrawString("X", New Font("Arial", 20), Brushes.Black, e.Location.X, e.Location.Y) End Sub ' See a proof (optional), move your cursor around (inside) your form WITHOUT clicking and wait till timer's click event fires: ![]() Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim arg As New MouseEventArgs(, _ 1, .X, .Y, Nothing) Me.OnMouseClick(arg) End Sub So, if you'd like to click around your programmatically, create a MouseEventArgs and use a timer like this:įor example click on every 5 minutes which means 300000 ms interval that is the value must be set as Timer's interval, then: Assuming you're dealing around your form, because IMHO creating a program that clicks everywhere on the screen (that can be done usingĪPI like here) sounds a irritating experience for a computer user. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |