Mar 25
I was recently looking online for a complete list of Virtual Key Codes I could use in Visual Basic (these are used with the keybd_event, MapVirtualKey, GetKeyState, and GetAsyncKeyState functions). I couldn't find one so I decided to make my own. Since most of the lists I found online were incomplete I went straight to the source, winuser.h, and converted these line-by-line from their original C declarations. Some additional comments and key descriptions I included are from the MSDN.
Download VirtualKeyCodes.bas (March 25, 2009)
Read the rest of this entry »
Mar 06
Here's a simple function I wrote for URL Encoding a string in Visual Basic. I also have a list of URL Escape Codes available for download as well.
Download URLEncode.bas (June 01, 2005)
Read the rest of this entry »
Mar 06
Here are two different ways I've come up with for determining if a number is an integer in Visual Basic. The first way, IsInteger, is a function that will return true if you pass it a VB Integer data type. The second way, IsIntegerStr, is a function that will return true if you pass it a VB Integer data type or an integer in string form.
Download IsInteger.bas (May 31, 2006)
Read the rest of this entry »
Mar 06
Here's a Visual Basic function I wrote called extractOnlyNumbers which returns the numeric only parts of a string. For example, extractOnlyNumbers("123a4") would return 1234 (as a double). If you decide to pass it the second parameter (stop_at_non_numeric), then it will stop processing when it reaches a non-numeric character so extractOnlyNumbers("123a4") would return 123 (as a double). This second parameter is optional, if you don't pass it then it will process all characters.
Download extractOnlyNumbers.bas (May 31, 2006)
Read the rest of this entry »
Mar 06
Here's a Visual Basic function I wrote called getDataType that returns a string representation of the passed item's data type. This is different from VarType in that VarType returns an integer, and this returns a human readable string. I know this is similar to the TypeName function but this is just my spin on it.
Download getDataType.bas (May 31, 2006)
Read the rest of this entry »
Recent Comments