ArrayReplace – A Replace routine that works through all the items of the input array
‘ A Replace routine that works through all the items of the input array” Example:’ Dim arr As Integer() = {3, 7, 8, 2, 7, 0, 9, 7}’ ArrayReplace(arr, 7,
‘ A Replace routine that works through all the items of the input array” Example:’ Dim arr As Integer() = {3, 7, 8, 2, 7, 0, 9, 7}’ ArrayReplace(arr, 7,
‘ The sum of an array of any numeric type” Example:’ Dim arr As Integer() = {3, 7, 8, 2, 0, 9}’ MessageBox.Show(ArraySum(arr))Function ArraySum(ByVal arr As Array) As Double Return
‘ Fill the input array with random values” Example:’ Dim arr(9) As Integer’ FillRandomArray(arr, 1, 11)’ Dim i As Integer’ For i = 0 To 9′ Debug.Write(arr(i) & ” “)’
‘ Enable the key-skipping mechanism for the input TextBox and for the input ‘ chars’ Example: don’t process the ‘A’, ‘b’ and ‘0’ chars’ EnableTextBoxCharSkip(TextBox1, “A”c, “b”c, “0”c)Sub EnableTextBoxCharSkip(ByVal tb
‘ Find all the controls with the specified Tag value’ Example:’ Dim ctrls() As Control = GetControlsByTag(“OK”, Me)’ Dim ctrl As Control’ For Each ctrl In ctrls’ Debug.WriteLine(ctrl.Name)’ NextFunction GetControlsByTag(ByVal
‘ Set a property of multiple controls/objects in a single step,’ and return True if successful’ Note: requires the SetProperty function” Example: SetPropertyEx(“Text”, “OK!!!”, TextBox1, Button1, Button2)Function SetPropertyEx(ByVal propertyName As
‘ Return True if all the controls in the input array have the same value for ‘ the specified property’ Note: requires the GetField function” Example:’ Debug.WriteLine(HaveSameValue(“Text”, TextBox1, Button1, Button2))’
Shared Function _ SendMessage(ByVal hWnd As Integer, ByVal wMsg As Integer, _ ByVal wParam As Integer, ByVal lParam As Integer) As IntegerEnd Function’ Determine the current line in a multiline
‘ Return a random item from a mono/bi/tri-dimensional array or collection’ ‘ Example:’ Dim arr1 As String() = {“this is string 0”, “this is string 1”,’ ‘ “this is string