Imports System.DrawingImports System.ComponentModel'Imports MicroFour.StrataFrame.BusinessImports MicroFour.StrataFrame.UI.CollectionsImports System.Windows.Forms.Button ''' <summary>''' My Button class. I will use this class to exit a form.''' </summary>''' <remarks></remarks><ToolboxBitmap(GetType(System.Windows.Forms.Button))>Public Class myExitButton2 Inherits MicroFour.StrataFrame.UI.Windows.Forms.Button Private _parentForm As System.Windows.Forms.Form Public Property ParentForm() As System.Windows.Forms.Form Get Return _parentForm End Get Set(ByVal value As System.Windows.Forms.Form) _parentForm = value End Set End Property Protected Overrides Sub OnCreateControl() MyBase.OnCreateControl() Me.Text = "Close" Me.Width = 75 Me.Height = 23 End Sub Protected Overrides Sub OnClick(ByVal e As EventArgs) MyBase.OnClick(e) '-- Close the form if its set. If Me.ParentForm IsNot Nothing Then Me.ParentForm.Close() End If End Sub
Imports MicroFour.StrataFrame.UI.Collections