imports System
imports System.Drawing
imports System.Windows.Forms
public class ControlDock : inherits Form
public sub New()
Text = "Control Docking"
Size = new Size(350,400)
dim yButtonSize as integer = Font.Height * 2
dim btnFirst as new Button()
btnFirst.Parent = me
btnFirst.Text = "First Button"
btnFirst.Height = yButtonSize
btnFirst.Dock = DockStyle.Top
dim btnSecond as new Button()
btnSecond.Parent = me
btnSecond.Text = "Second Button"
btnSecond.Height = yButtonSize
btnSecond.Dock = DockStyle.Bottom
end sub
public shared sub Main()
Application.Run(new ControlDock())
end sub
end class
|