addhandler closeButton.Click, addressof closeButton_Click sub closeButton_Click(Byval sender as Object, byval e as EventArgs) this.Parent.Close() end sub