SUB takes into account several buttons. If there is nothing in the textbox, type a message MessageBox.Show ("please save ...") but it is not the action of the start button, type EXIT, but it works not.
I cannot put the ELSE, because SUB manages several buttons
Here's the code:
Code:
Private Sub ManagementOfButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click, button2.Click
If TextBox1.Text.Length < 5 Then
MessageBox.Show("Thank you to comment")
End If
End Sub
'button 1
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
webrowser.navigate(TextBox1.Text)
End Sub
'button 2
Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
webrowser.navigate(TextBox1.Text)
End Sub
Bookmarks