Animated form icons
You can add a professional touch to your apps by showing an animated icon when the main form is minimized. To achieve this effect, prepare an array of Image controls,
You can add a professional touch to your apps by showing an animated icon when the main form is minimized. To achieve this effect, prepare an array of Image controls,
When you need to count how many occurrences of a given character are in a string, you might be tempted to go along the “traditional” Visual Basic way: ‘ count
The Point method returns the color value of a given pixel, but is rather slow because it has to convert its argument from twips (or whatever ScaleMode is currently active)
‘ Enable/Disable the Registry editor (RegEdit.exe)’ NOTE: this routine requires the SetRegistryValue,’ DeleteRegistryValue and CheckRegistryValue routines,’ that you can find in the CodeBank under the Windows section.” Example:’ ‘ disable
‘ Return True if the passed State initials are valid’ Example:’ MsgBox CheckUSState(“NY”)Public Function CheckUSState(ByVal State As String) As Boolean If Len(State) = 2 And InStr(“,AL,AK,AZ,AR,CA,CO,CT,DE,DC,FL,GA,HI,ID,IL,IN,I” _ & “A,KS,KY,LA,ME,MD,MA,MI,MN,MS,MO,MT,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,P” _
‘ Determine whether the IE Favorites menu item is enabled’ Note: requires the GetRegistryValue routine, you can find it in the CodeBank’ Example:’ MsgBox “Favorites menu item is enabled: “
‘ Get the IE’s window title’ Note: requires the GetRegistryValue routine, you can find it in the CodeBank’ Example:’ MsgBox GetIETitlePublic Function GetIETitle() As String Const HKEY_CURRENT_USER = &H80000001 GetIETitle
Private Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” _ (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String,
‘ Set the IE’s window title’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’ Example:’ SetIETitle “MY IE”‘ To set the default