Public Class miFormulario
Friend WithEvents Button1 As System.Windows.Forms.Button
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'aquí va el código a ejecutar tras arrancar la aplicación
'aquí puedes colocar el código para generar tu botón o puedes ya tenerlo creado como en el siguiente apartado.
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
Me.Button1.Location = New System.Drawing.Point(66, 127)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(101, 31)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("hola mundo, estoy en modo ventanas no en consola", MsgBoxStyle.Exclamation, "al fin una ventana:...")
End Sub
end class