_ Private _btnCalc As Button _ Private _btnClose As Button _ Private _btnClr As Button _ Private _Label1 As Label _ Private _Label2 As Label _ Private _Label3 As Label _ Private _lbltotal As Label _ Private _lbltotaldue As Label _ Private _txtConct As TextBox _ Private _txtPrem As TextBox _ Private _txtType As TextBox Private BusPremChan As Decimal Private BusProcFee As Decimal Private BusServFee As Decimal Private components As IContainer Private ResPremChan As Decimal Private ResProcFee As Decimal Private ResServFee As Decimal Public Sub New() Me.ResProcFee = 4.5 Me.ResServFee = 30 Me.ResPremChan = 5 Me.BusProcFee = 16.5 Me.BusServFee = 80 Me.BusPremChan = 50 Me.InitializeComponent End Sub _ Public Class ContainerControl Inherits ScrollableControl Implements IContainerControl ' Events _ Public Event AutoValidateChanged As EventHandler ' Methods Shared Sub New() Public Sub New() Friend Function ActivateControlInternal(ByVal control As Control) As Boolean Friend Function ActivateControlInternal(ByVal control As Control, ByVal originator As Boolean) As Boolean _ Protected Overrides Sub AdjustFormScrollbars(ByVal displayScrollbars As Boolean) Friend Overridable Sub AfterControlRemoved(ByVal control As Control, ByVal oldParent As Control) Private Function AssignActiveControlInternal(ByVal value As Control) As Boolean Private Sub AxContainerFormCreated() Friend Overrides Function CanProcessMnemonic() As Boolean Friend Function CreateAxContainer() As AxContainer Protected Overrides Sub Dispose(ByVal disposing As Boolean) Private Sub EnableRequiredScaling(ByVal start As Control, ByVal enable As Boolean) Private Sub EnsureUnvalidatedControl(ByVal candidate As Control) Private Sub EnterValidation(ByVal enterControl As Control) Private Function FindScrollableParent(ByVal ctl As Control) As ScrollableControl Friend Sub FocusActiveControlInternal() Private Function GetFontAutoScaleDimensions() As SizeF Friend Overrides Function GetPreferredSizeCore(ByVal proposedSize As Size) As Size Friend Function HasFocusableChild() As Boolean Private Sub LayoutScalingNeeded() Friend Overridable Sub OnAutoScaleModeChanged() Protected Overridable Sub OnAutoValidateChanged(ByVal e As EventArgs) Friend Overrides Sub OnChildLayoutResuming(ByVal child As Control, ByVal performLayout As Boolean) Protected Overrides Sub OnCreateControl() _ Protected Overrides Sub OnFontChanged(ByVal e As EventArgs) Friend Overrides Sub OnFrameWindowActivate(ByVal fActivate As Boolean) Protected Overrides Sub OnLayout(ByVal e As LayoutEventArgs) Friend Overrides Sub OnLayoutResuming(ByVal performLayout As Boolean) Protected Overrides Sub OnParentChanged(ByVal e As EventArgs) Public Sub PerformAutoScale() Private Sub PerformAutoScale(ByVal includedBounds As Boolean, ByVal excludedBounds As Boolean) Private Sub PerformNeededAutoScaleOnLayout() Private Function ProcessArrowKey(ByVal forward As Boolean) As Boolean _ Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean _ Protected Overrides Function ProcessDialogChar(ByVal charCode As Char) As Boolean _ Protected Overrides Function ProcessDialogKey(ByVal keyData As Keys) As Boolean _ Protected Friend Overrides Function ProcessMnemonic(ByVal charCode As Char) As Boolean _ Protected Overridable Function ProcessTabKey(ByVal forward As Boolean) As Boolean Friend Sub ResetActiveAndFocusedControlsRecursive() Private Sub ResetValidationFlag() Friend Sub ResumeAllLayout(ByVal start As Control, ByVal performLayout As Boolean) Friend Overrides Sub Scale(ByVal includedFactor As SizeF, ByVal excludedFactor As SizeF, ByVal requestingControl As Control) Private Sub ScrollActiveControlIntoView() Protected Overrides Sub [Select](ByVal directed As Boolean, ByVal forward As Boolean) Private Sub SetActiveControl(ByVal ctl As Control) Friend Sub SetActiveControlInternal(ByVal value As Control) _ Friend Overridable Function ShouldSerializeAutoValidate() As Boolean Friend Sub SuspendAllLayout(ByVal start As Control) Private Function System.Windows.Forms.IContainerControl.ActivateControl(ByVal control As Control) As Boolean Implements IContainerControl.ActivateControl Protected Overridable Sub UpdateDefaultButton() Friend Sub UpdateFocusedControl() Public Function Validate() As Boolean Public Function Validate(ByVal checkAutoValidate As Boolean) As Boolean _ Public Overridable Function ValidateChildren() As Boolean _ Public Overridable Function ValidateChildren(ByVal validationConstraints As ValidationConstraints) As Boolean Friend Function ValidateInternal(ByVal checkAutoValidate As Boolean, ByRef validatedControlAllowsFocusChange As Boolean) As Boolean Private Function ValidateThroughAncestor(ByVal ancestorControl As Control, ByVal preventFocusChangeOnError As Boolean) As Boolean Private Sub WmSetFocus(ByRef m As Message) _ Protected Overrides Sub WndProc(ByRef m As Message) ' Properties _ Public Property ActiveControl As Control _ Public Property AutoScaleDimensions As SizeF Protected ReadOnly Property AutoScaleFactor As SizeF _ Public Property AutoScaleMode As AutoScaleMode _ Public Overridable Property AutoValidate As AutoValidate _ Public Overrides Property BindingContext As BindingContext Protected Overrides ReadOnly Property CanEnableIme As Boolean Protected Overrides ReadOnly Property CreateParams As CreateParams _ Public ReadOnly Property CurrentAutoScaleDimensions As SizeF Friend ReadOnly Property InnerMostActiveContainerControl As ContainerControl Friend ReadOnly Property InnerMostFocusedContainerControl As ContainerControl _ Public ReadOnly Property ParentForm As Form Friend ReadOnly Property ParentFormInternal As Form ' Fields Private activeControl As Control Private autoScaleDimensions As SizeF Private autoScaleMode As AutoScaleMode Private autoValidate As AutoValidate Private autoValidateChanged As EventHandler Private currentAutoScaleDimensions As SizeF Private focusedControl As Control Private Const fontMeasureString As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" Private Shared ReadOnly PropAxContainer As Integer Private state As BitVector32 Private Shared ReadOnly stateParentChanged As Integer Private Shared ReadOnly stateProcessingMnemonic As Integer Private Shared ReadOnly stateScalingChild As Integer Private Shared ReadOnly stateScalingNeededOnLayout As Integer Private Shared ReadOnly stateValidating As Integer Private unvalidatedControl As Control End Class Expand Methods _ Public Class ScrollableControl Inherits Control Implements IArrangedElement, IComponent, IDisposable ' Events _ Public Event Scroll As ScrollEventHandler ' Methods Shared Sub New() Public Sub New() _ Protected Overridable Sub AdjustFormScrollbars(ByVal displayScrollbars As Boolean) Private Function ApplyScrollbarChanges(ByVal display As Rectangle) As Boolean Private Function GetDisplayRectInternal() As Rectangle _ Protected Function GetScrollState(ByVal bit As Integer) As Boolean _ Protected Overrides Sub OnLayout(ByVal levent As LayoutEventArgs) _ Protected Overrides Sub OnMouseWheel(ByVal e As MouseEventArgs) Protected Overrides Sub OnPaddingChanged(ByVal e As EventArgs) Protected Overrides Sub OnPaintBackground(ByVal e As PaintEventArgs) _ Protected Overrides Sub OnRightToLeftChanged(ByVal e As EventArgs) Protected Overridable Sub OnScroll(ByVal se As ScrollEventArgs) Private Sub OnSetScrollPosition(ByVal sender As Object, ByVal e As EventArgs) _ Protected Overrides Sub OnVisibleChanged(ByVal e As EventArgs) Private Sub ResetAutoScrollMargin() Private Sub ResetAutoScrollMinSize() Private Sub ResetScrollProperties(ByVal scrollProperties As ScrollProperties) Protected Overrides Sub ScaleControl(ByVal factor As SizeF, ByVal specified As BoundsSpecified) _ Protected Overrides Sub ScaleCore(ByVal dx As Single, ByVal dy As Single) Friend Sub ScaleDockPadding(ByVal dx As Single, ByVal dy As Single) Public Sub ScrollControlIntoView(ByVal activeControl As Control) Private Function ScrollThumbPosition(ByVal fnBar As Integer) As Integer Protected Overridable Function ScrollToControl(ByVal activeControl As Control) As Point Public Sub SetAutoScrollMargin(ByVal x As Integer, ByVal y As Integer) Friend Sub SetDisplayFromScrollProps(ByVal x As Integer, ByVal y As Integer) Private Function SetDisplayRectangleSize(ByVal width As Integer, ByVal height As Integer) As Boolean Protected Sub SetDisplayRectLocation(ByVal x As Integer, ByVal y As Integer) Protected Sub SetScrollState(ByVal bit As Integer, ByVal value As Boolean) Private Function SetVisibleScrollbars(ByVal horiz As Boolean, ByVal vert As Boolean) As Boolean Private Function ShouldSerializeAutoScrollMargin() As Boolean Private Function ShouldSerializeAutoScrollMinSize() As Boolean Private Function ShouldSerializeAutoScrollPosition() As Boolean Private Sub SyncScrollbars(ByVal autoScroll As Boolean) Private Sub UpdateFullDrag() Private Sub WmHScroll(ByRef m As Message) Private Sub WmOnScroll(ByRef m As Message, ByVal oldValue As Integer, ByVal value As Integer, ByVal scrollOrientation As ScrollOrientation) Private Sub WmSettingChange(ByRef m As Message) Private Sub WmVScroll(ByRef m As Message) _ Protected Overrides Sub WndProc(ByRef m As Message) ' Properties _ Public Overridable Property AutoScroll As Boolean _ Public Property AutoScrollMargin As Size _ Public Property AutoScrollMinSize As Size _ Public Property AutoScrollPosition As Point Protected Overrides ReadOnly Property CreateParams As CreateParams Public Overrides ReadOnly Property DisplayRectangle As Rectangle _ Public ReadOnly Property DockPadding As DockPaddingEdges _ Public ReadOnly Property HorizontalScroll As HScrollProperties Protected Property HScroll As Boolean Private ReadOnly Property System.Windows.Forms.Layout.IArrangedElement.DisplayRectangle As Rectangle _ Public ReadOnly Property VerticalScroll As VScrollProperties Protected Property VScroll As Boolean ' Fields Friend Shared ReadOnly AutoScrolling As TraceSwitch Private displayRect As Rectangle Private dockPadding As DockPaddingEdges Private Shared ReadOnly EVENT_SCROLL As Object Private horizontalScroll As HScrollProperties Private requestedScrollMargin As Size Private resetRTLHScrollValue As Boolean Private scrollMargin As Size Friend scrollPosition As Point Private scrollState As Integer Protected Const ScrollStateAutoScrolling As Integer = 1 Protected Const ScrollStateFullDrag As Integer = &H10 Protected Const ScrollStateHScrollVisible As Integer = 2 Protected Const ScrollStateUserHasScrolled As Integer = 8 Protected Const ScrollStateVScrollVisible As Integer = 4 Private userAutoScrollMinSize As Size Private verticalScroll As VScrollProperties ' Nested Types _ Public Class DockPaddingEdges Implements ICloneable ' Methods Friend Sub New(ByVal owner As ScrollableControl) Friend Sub New(ByVal left As Integer, ByVal right As Integer, ByVal top As Integer, ByVal bottom As Integer) Public Overrides Function Equals(ByVal other As Object) As Boolean Public Overrides Function GetHashCode() As Integer Private Sub ResetAll() Private Sub ResetBottom() Private Sub ResetLeft() Private Sub ResetRight() Private Sub ResetTop() Friend Sub Scale(ByVal dx As Single, ByVal dy As Single) Private Function System.ICloneable.Clone() As Object Implements ICloneable.Clone Public Overrides Function ToString() As String ' Properties _ Public Property All As Integer _ Public Property Bottom As Integer _ Public Property Left As Integer _ Public Property Right As Integer _ Public Property Top As Integer ' Fields Private bottom As Integer Private left As Integer Private owner As ScrollableControl Private right As Integer Private top As Integer End Class Public Class DockPaddingEdgesConverter Inherits TypeConverter ' Methods Public Sub New() Public Overrides Function GetProperties(ByVal context As ITypeDescriptorContext, ByVal value As Object, ByVal attributes As Attribute()) As PropertyDescriptorCollection Public Overrides Function GetPropertiesSupported(ByVal context As ITypeDescriptorContext) As Boolean End Class End Class Expand Methods Public Interface IContainerControl ' Methods Function ActivateControl(ByVal active As Control) As Boolean ' Properties Property ActiveControl As Control End Interface _ Friend Class MyApplication Inherits WindowsFormsApplicationBase ' Methods _ Public Sub New() _ Friend Shared Sub Main(ByVal Args As String()) _ Protected Overrides Sub OnCreateMainForm() End Class Expand Methods