Simple window frame : Frame Form « GUI « VB.Net






Simple window frame

Simple window frame
 
Imports System
Imports System.Windows.Forms

Class MyFirstForm
    Inherits Form

    Private WithEvents mybutton As Button

    Public Sub New()
        Me.Text = "Hello, WinForms!"
        mybutton = New Button()
        mybutton.Text = "Click Me!"
        Me.Controls.Add(mybutton)
    End Sub

    Public Sub mybutton_Click(sender As Object, e As EventArgs) Handles mybutton.Click
        MessageBox.Show("Message")
    End Sub

    Shared Sub Main()
        Dim myform As Form = New MyFirstForm()
        Application.Run(myform)
    End Sub
End Class
           
         
  








Related examples in the same category

1.Form Opacity in VBForm Opacity in VB
2.Non rectangle window in VBNon rectangle window in VB
3.Get Frame Client Rectangle SizeGet Frame Client Rectangle Size
4.Resetting a Form
5.Snap to Control