Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TestMsg("test แบบกดปุ่ม")
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TestMsg("test แบบไม่กดปุ่ม")
End Sub
Public Sub TestMsg(Optional str As String = "")
MessageBox.Show(str)
End Sub
End Class