Tip Bank

DevX

Setting a pixel color

The PSet method is much slower than it should actually be, and in most cases you will find it convenient to substitute it with direct calls to the SetPixel API

DevX

Counting characters in a file

Ever needed to count how many characters of a given type are in a file? For instance, how many alphabetical characters, or digits, or spaces? You might read each line

DevX

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,

DevX

EnableRegistryTools – Enable or disable the RegEdit utility

‘ 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

DevX

CheckUSState – Validate a US state initial

‘ 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” _

DevX

GetIETitle – Read the title used for Internet Explorer

‘ 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