A code that does so that it Left Clicks and writes a ceratin text?

Posts 1–6 of 6 · Page 1 of 1
A code that does so that it Left Clicks and writes a ceratin text?
Okay as I sade in the titel I need help figuring out how to make it so that it Left Clicks when I press a button and after that it Clicked I would need it to write something (I just need it to write I don't need it to create a msg box or something like that).

Any help is appreciated.

My current code:

Code:
Public Class Form1

    Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long) 'Long may have to change to type Int32 or DWORD

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

        Me.Cursor = New Cursor(Cursor.Current.Handle)
        Cursor.Position = New Point(483, 857)


      End Sub

End Class
What do you mean exactly with "to write something"?
Quote Originally Posted by ISD View Post
What do you mean exactly with "to write something"?
After it has clicked a box will open and then it will write something simple like 'Test1'.
You can add a new Form (as a Box) to your Project.

1x Button (OpenButton) for Form1
+1 Form (Form2)
1x Label (MessageLabel) for Form2

Code:
    Private Sub OpenButton_Click(sender As Object, e As EventArgs) Handles OpenButton.Click
        Form2.Show() 'Open Form2
        Form2.MessageLabel.Text = "[Message]" 'Label Text for Form2
    End Sub
Is it that what you mean?
Quote Originally Posted by ISD View Post
You can add a new Form (as a Box) to your Project.

1x Button (OpenButton) for Form1
+1 Form (Form2)
1x Label (MessageLabel) for Form2

Code:
    Private Sub OpenButton_Click(sender As Object, e As EventArgs) Handles OpenButton.Click
        Form2.Show() 'Open Form2
        Form2.MessageLabel.Text = "[Message]" 'Label Text for Form2
    End Sub
Is it that what you mean?
No, on the Form it will only be One Button and when you click that button it will redirect you to a program and then it will need to click a box that already is there. So what I need is that it writes a text after the command has bin executed.
dose this work?
SendKeys.Send("Message")
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?