Imports SMath.Manager Imports SMath.Controls Public Class FormControl_4a_Implementer : Implements IPluginMenuExtender Private disposedValue As Boolean 'Generated by Default Public Sub Initialize() Implements IPlugin.Initialize 'Throw New NotImplementedException() 'Generated by Default; Comment out/delete for plugin to execute End Sub Public Const CURSOR_STEP As Integer = 10 'Number of pixels to move cursor; referenced by: (btnKeyPress11 .. btnKeyPress15) '''============================================================================================== ''' GetMenuItem ''' Kenneth M. Lemens (username: lemensk) ''' 2022-12-15 ''' IPluginMenuExtender ''' Adds MenuButtons to the Menu Bar ''' MenuButtons are assigned Shortcut keys, to be used within a document (regions need not be selected) ''' Shortcut keys to Mimic some Mathcad 15.0 Keypresses, enhances ability to insert operators within SMath ''' MENU BAR BUTTON LAYOUT: ''' [Tools] ''' [Keyboard Extension] ''' - 「Ctrl」+「%」 :: Boolean XOR (Exclusive or) ''' - 「Ctrl」+「!」 :: Boolean NOT ''' - 「Ctrl」+「-」 :: Insert a Macron (bar) Above the Previous Character ''' - 「Ctrl」+「_」 :: Insert a Macron Below (undlerline) Above Previous Character ''' - 「Ctrl」+「+」numpad :: Plus Minus Sign (Returns a set of 2: the sum And difference) ''' - 「Ctrl」+「-」numpad :: Minus Plus Sign (Returns a set of 2: the difference And sum) ''' - 「Ctrl」+「~」 :: Approximately Equal to (「Ctrl」+「Alt」+「=」) ''' - 「Ctrl」+「Shift」+「~」 :: Approximately NOT Equal to ''' - 「Ctrl」+「;」 :: Range variable [a .. b] (step = 1) ''' - 「Ctrl」+「4」 :: Vector sum ''' - 「Ctrl」+「Shift」+「Enter」 :: Move ✛ to Start of Next Line (Line Feed & Carriage Return Only) "Ignore Region Interaction" Mode --- DocumentPointer - Line Feed [↩] ''' - 「Ctrl」+[↓] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [↓] ''' - 「Ctrl」+[←] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [←] ''' - 「Ctrl」+[→] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [→] ''' - 「Ctrl」+[↑] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [↑] ''' ''' (byRef) SMath.Manager.SessionProfile (Not Utilized) ''' TYPE: MenuButton() - List of MenuButtons) ''' ''' Imports: SMath.Manager; SMath.Controls ''' Implements: SMath.Controls.IPluginMenuExtender ''' References: KEY CODES for "ShortcutKey" property (NOTE: Operator 'Or' does not serve as a boolean operator) ''' https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?view=windowsdesktop-7.0 ''' Unstructured Exit: FALSE ''' Error Handler: TRUE (MenuButton Subs contain 'Try' statements) ''' '''============================================================================================== Public Function GetMenuItem(_profileOfSession As SessionProfile) As MenuButton() Implements IPluginMenuExtender.GetMenuItem 'Throw New NotImplementedException() 'Generated by Default; Comment out/delete for plugin to execute '「Ctrl」+「%」 :: Boolean XOR (Exclusive or) Dim btnKeyPress01 As SMath.Controls.MenuButton btnKeyPress01 = New MenuButton("Boolean XOR", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("¤", SMath.Manager.TermType.Operator, 2)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("¤") End If Catch 'do nothing! End Try End Sub) : btnKeyPress01.ShortcutKey = InputKeys.Control Or InputKeys.Shift Or InputKeys.D5 '「Ctrl」+「!」 :: Boolean NOT Dim btnKeyPress02 As SMath.Controls.MenuButton btnKeyPress02 = New MenuButton("Boolean NOT", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("¬", SMath.Manager.TermType.Operator, 1)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("¬") End If Catch 'do nothing! End Try End Sub) : btnKeyPress02.ShortcutKey = InputKeys.Control Or InputKeys.Shift Or InputKeys.D1 '「Ctrl」+「-」 :: Insert a Macron (bar) Above the Previous Character Dim btnKeyPress03 As SMath.Controls.MenuButton btnKeyPress03 = New MenuButton("Macron Above (x̅)", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then 'do nothing! Else _args.CurrentRegion.OnCommandSend("̅") End If Catch 'do nothing! End Try End Sub) : btnKeyPress03.ShortcutKey = InputKeys.Control Or InputKeys.OemMinus '「Ctrl」+「_」 :: Insert a Macron Below (undlerline) Above Previous Character Dim btnKeyPress04 As SMath.Controls.MenuButton btnKeyPress04 = New MenuButton("Macron Below (x̲)", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then 'do nothing! Else _args.CurrentRegion.OnCommandSend("̲") End If Catch 'do nothing! End Try End Sub) : btnKeyPress04.ShortcutKey = InputKeys.Control Or InputKeys.Shift Or InputKeys.OemMinus '「Ctrl」+「+」numpad :: Plus Minus Sign (Returns a set of 2: the sum And difference) Dim btnKeyPress05 As SMath.Controls.MenuButton btnKeyPress05 = New MenuButton("Plus Minus (±)", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("±", SMath.Manager.TermType.Operator, 1)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("±") End If Catch 'do nothing! End Try End Sub) : btnKeyPress05.ShortcutKey = InputKeys.Control Or InputKeys.Add '「Ctrl」+「-」numpad :: Minus Plus Sign (Returns a set of 2: the difference And sum) Dim btnKeyPress06 As SMath.Controls.MenuButton btnKeyPress06 = New MenuButton("Minus Plus (∓)", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("∓", SMath.Manager.TermType.Operator, 1)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("∓") End If Catch 'do nothing! End Try End Sub) : btnKeyPress06.ShortcutKey = InputKeys.Control Or InputKeys.Subtract '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 'Supported in Later Versions (v1.00+) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ' '「Ctrl」+「~」 :: Approximately Equal to (「Ctrl」+「Alt」+「=」) Dim btnKeyPress07 As SMath.Controls.MenuButton btnKeyPress07 = New MenuButton("Approx. Equal (≈)", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("≈", SMath.Manager.TermType.Operator, 2)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("≈") End If Catch 'do nothing! End Try End Sub) : btnKeyPress07.ShortcutKey = InputKeys.Control Or InputKeys.Oemtilde '「Ctrl」+「Shift」+「~」 :: Approximately NOT Equal to Dim btnKeyPress08 As SMath.Controls.MenuButton btnKeyPress08 = New MenuButton("Approx. NOT Equal (≉)", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("≉", SMath.Manager.TermType.Operator, 2)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("≉") End If Catch 'do nothing! End Try End Sub) : btnKeyPress08.ShortcutKey = InputKeys.Control Or InputKeys.Shift Or InputKeys.Oemtilde '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 'Functions (not operators) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ '「Ctrl」+「;」 :: Range variable [a .. b] (step = 1) Dim btnKeyPress09 As SMath.Controls.MenuButton btnKeyPress09 = New MenuButton("Insert range ( ▮..▮ )", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("range", SMath.Manager.TermType.Function, 2)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("range(,") End If Catch 'do nothing! End Try End Sub) : btnKeyPress09.ShortcutKey = InputKeys.Control Or InputKeys.OemSemicolon '「Ctrl」+「4」 :: Vector sum Dim btnKeyPress10 As SMath.Controls.MenuButton btnKeyPress10 = New MenuButton("Insert Summation ( Σ ▮ )", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then Dim Bénézet As SMath.Controls.MathRegion = New SMath.Controls.MathRegion(_args.SessionProfile) Dim Rhône = New List(Of SMath.Manager.Term) Rhône.Add(New SMath.Manager.Term("#", SMath.Manager.TermType.Operand, 0)) Rhône.Add(New SMath.Manager.Term("sum", SMath.Manager.TermType.Function, 1)) Bénézet.Terms = Rhône.ToArray Dim Avignon As SMath.Controls.RegionsEnumerator = New SMath.Controls.RegionsEnumerator(New List(Of SMath.Controls.RegionBase)({Bénézet}), 0) _args.Worksheet.CreateRegions(Avignon, 0, 0, , ) Else _args.CurrentRegion.OnCommandSend("sum(") End If Catch 'do nothing! End Try End Sub) : btnKeyPress10.ShortcutKey = InputKeys.Control Or InputKeys.D4 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 'Navigation (move Document Pointer (Crosshair Cursor)) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ '「Ctrl」+「Shift」+「Enter」 :: Move ✛ to Start of Next Line (Line Feed & Carriage Return Only) "Ignore Region Interaction" Mode --- DocumentPointer - Line Feed [↩] Dim btnKeyPress11 As SMath.Controls.MenuButton btnKeyPress11 = New MenuButton("DocumentPointer - Line Feed [↩]", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then _args.Worksheet.Pointer.SetLocation(New Drawing.Point(5, _args.Worksheet.Pointer.Location.Y + CURSOR_STEP)) Else _args.Worksheet.UnfocusRegions() _args.Worksheet.Pointer.SetLocation(New Drawing.Point(5, _args.Worksheet.Pointer.Location.Y + _args.CurrentRegion.Size.Height + CURSOR_STEP)) End If Catch 'do nothing! End Try End Sub) : btnKeyPress11.ShortcutKey = InputKeys.Control Or InputKeys.Shift Or InputKeys.Return '「Ctrl」+[↓] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [↓] Dim btnKeyPress12 As SMath.Controls.MenuButton btnKeyPress12 = New MenuButton("DocumentPointer [↓]", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X, _args.Worksheet.Pointer.Location.Y + CURSOR_STEP)) Else _args.Worksheet.UnfocusRegions() _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X, _args.Worksheet.Pointer.Location.Y + _args.CurrentRegion.Size.Height + CURSOR_STEP)) End If Catch 'do nothing! End Try End Sub) : btnKeyPress12.ShortcutKey = InputKeys.Control Or InputKeys.Down '「Ctrl」+[←] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [←] Dim btnKeyPress13 As SMath.Controls.MenuButton btnKeyPress13 = New MenuButton("DocumentPointer [←]", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X - CURSOR_STEP, _args.Worksheet.Pointer.Location.Y)) Else _args.Worksheet.UnfocusRegions() _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X - CURSOR_STEP, _args.Worksheet.Pointer.Location.Y + _args.CurrentRegion.Size.Height / 2)) End If Catch 'do nothing! End Try End Sub) : btnKeyPress13.ShortcutKey = InputKeys.Control Or InputKeys.Left '「Ctrl」+[→] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [→] Dim btnKeyPress14 As SMath.Controls.MenuButton btnKeyPress14 = New MenuButton("DocumentPointer [→]", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X + CURSOR_STEP, _args.Worksheet.Pointer.Location.Y)) Else _args.Worksheet.UnfocusRegions() _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X + _args.CurrentRegion.Size.Width + CURSOR_STEP, _args.Worksheet.Pointer.Location.Y + _args.CurrentRegion.Size.Height / 2)) End If Catch 'do nothing! End Try End Sub) : btnKeyPress14.ShortcutKey = InputKeys.Control Or InputKeys.Right '「Ctrl」+[↑] :: Enter "Ignore Region Interaction" Mode --- DocumentPointer [↑] Dim btnKeyPress15 As SMath.Controls.MenuButton btnKeyPress15 = New MenuButton("DocumentPointer [↑]", Sub(_args As MenuButtonArgs) Try If IsNothing(_args.CurrentRegion) Then _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X, _args.Worksheet.Pointer.Location.Y - CURSOR_STEP)) Else _args.Worksheet.UnfocusRegions() _args.Worksheet.Pointer.SetLocation(New Drawing.Point(_args.Worksheet.Pointer.Location.X, _args.Worksheet.Pointer.Location.Y - CURSOR_STEP)) End If Catch 'do nothing! End Try End Sub) : btnKeyPress15.ShortcutKey = InputKeys.Control Or InputKeys.Up 'Proof of Concept: Assign [F1] Dim btnKeyPressHelp = New MenuButton("Help / About", Sub(_args As MenuButtonArgs) MsgBox("======================================" & vbCrLf & "name: GetMenuItem" & vbCrLf & "author: Kenneth M. Lemens (username: lemensk)" & vbCrLf & "date: 2022-12-15" & vbCrLf & "type: IPluginMenuExtender" & vbCrLf & "summary:Adds MenuButtons to the Menu Bar (w/ hotkeys):" & vbCrLf & " Hotkeys work within region, or creates a new region" & vbCrLf & "https://en.smath.com/forum/Default.aspx?g=posts&t=23271" & vbCrLf & vbCrLf & " || MENU BAR BUTTON LAYOUT ||" & vbCrLf & " [Tools]" & vbCrLf & " [Keyboard Extension]" & vbCrLf & " - 「Ctrl」+「%」 - ▮⊕▮ Boolean XOR (Exclusive or) " & vbCrLf & " - 「Ctrl」+「!」 - ¬▮ Boolean NOT" & vbCrLf & " - 「Ctrl」+「-」 - x̅ Insert a Macron Above" & vbCrLf & " - 「Ctrl」+「_」 - x̲ Insert a Macron Below" & vbCrLf & " - 「Ctrl」+「+」numpad - ±▮; ▮±▮ Plus Minus Sign" & vbCrLf & " - 「Ctrl」+「-」numpad - ∓▮; ▮∓▮ Minus Plus Sign" & vbCrLf & " - 「Ctrl」+「~」 - ▮≈▮ Approx. Equal to (「Ctrl」+「Alt」+「=」)" & vbCrLf & " - 「Ctrl」+「Shift」+「~」 - ▮≉▮ Approx. NOT Equal to" & vbCrLf & " - 「Ctrl」+「;」 - ▮..▮ Range Function" & vbCrLf & " - 「Ctrl」+「4」 - Σ▮ Vector Sum" & vbCrLf & " - 「Ctrl」+「Shift」+「Enter」 - Move ✛ to Start of Next Line" & vbCrLf & " - 「Ctrl」+Arrows - Ignore Regions when moving cursor" & vbCrLf & "======================================" & vbCrLf & vbCrLf & "Press [Ctrl]+[C] to Copy this message to your clipboard...", vbOKOnly & vbInformation, "[Tools]→[Keyboard Extension] (by lemensk)") End Sub) : btnKeyPressHelp.ShortcutKey = InputKeys.F1 Dim btnKeyboardMenu = (New MenuButton("Keyboard Extension")) With btnKeyboardMenu .Location = MenuButtonLocation.ToolsMenu .AppendChild(btnKeyPress01) .AppendChild(btnKeyPress02) .AppendChild(btnKeyPress03) .AppendChild(btnKeyPress04) .AppendChild(btnKeyPress05) .AppendChild(btnKeyPress06) .AppendChild(btnKeyPress07) .AppendChild(btnKeyPress08) .AppendChild(btnKeyPress09) .AppendChild(btnKeyPress10) .AppendChild(btnKeyPress11) .AppendChild(btnKeyPress12) .AppendChild(btnKeyPress13) .AppendChild(btnKeyPress14) .AppendChild(btnKeyPress15) .AppendChild(btnKeyPressHelp) End With Return (New MenuButton() {btnKeyboardMenu}) End Function ' ======================================================================================================== ' \\\\ GENERATED SUBS //// =============================================================================== ' ======================================================================================================== Protected Overridable Sub Dispose(disposing As Boolean) If Not disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects) End If ' TODO: free unmanaged resources (unmanaged objects) and override finalizer ' TODO: set large fields to null disposedValue = True End If End Sub ' ' TODO: override finalizer only if 'Dispose(disposing As Boolean)' has code to free unmanaged resources ' Protected Overrides Sub Finalize() ' ' Do not change this code. Put cleanup code in 'Dispose(disposing As Boolean)' method ' Dispose(disposing:=False) ' MyBase.Finalize() ' End Sub Public Sub Dispose() Implements IDisposable.Dispose ' Do not change this code. Put cleanup code in 'Dispose(disposing As Boolean)' method Dispose(disposing:=True) GC.SuppressFinalize(Me) End Sub End Class