Marc Intes Marc Intes - 1 month ago 17
Vb.net Question

Click a button programmatically

I want to code a

button
that programmatically clicks the other
button
when I click it.

For example, I have two buttons named
Button1
and
Button2
, what I wanted to do is that immediately after I click
Button1
, it should click
Button2
. Is this possible?

Answer
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Button2_Click(Sender, e)
End Sub

This Code call button click event programmatically