Category Archives: Visual Basic 6 (VB6)

TextEffect

The following code will add great text effect to your applications. It changes the spacing between the characters. By changing spaces, the characters move on the screen. Original Author: Waty Thierry Inputs obj As ObjectByVal sText As StringByVal lX As LongByVal lY As LongOptional ByVal bLoop As Boolean = FalseOptional ByVal lStartSpacing As Long = 128Optional ByVal lEndSpacing As… Read More »

ConvertToSoundex

Converts a name or word string to a four digit code following Soundex rules. Similar code is used by geniological groups and the US Census Bureau for looking up names by phonetic sound. For example, the name Darrell can be spelled many different ways. Regardles of how you spell it, (Daryl, Derrel, Darel, etc.) the Soundex code is… Read More »

RegisterHotKey

Register a system wide hot key Original Author: Andy Barilla API Declarations Const WM_HOTKEY = &H312Const MOD_ALT = &H1Const MOD_CONTROL = &H2Const MOD_SHIFT = &H4Const MOD_WIN = &H8Private Declare Function RegisterHotKey Lib “user32” (ByVal hwnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As LongPrivate Declare Function GlobalAddAtom Lib “kernel32” Alias “GlobalAddAtomA” (ByVal… Read More »

Replace System Files After Rebooting

When you are creating a sort of Setup program, etc. sometimes you want to replace some system files or delete some other files, however if they are in use by Windows at the time, you can’t. You need to update the files after rebooting, you know that message that says “Please wait while windows updates your configuration files”,… Read More »

Convert Common Dialog Control Color to WEB Hex

This code takes the common dialog color, extracts the R, G, B values, andconverts each value to the correct HEX equivilant supported by HTML. Original Author: Charlie Wilson Inputs Function requires a common dialog control color being selected and passed to thefunction Assumptions You must add the common dialog control to your application. After the ShowOpen eventoccurs, pass the… Read More »

Open Folders As Windows from VB5

This code is for those people who want to open up folders/directories as separate windows, as compared to the alternative fileboxes. Original Author: Ted R. Smith Assumptions Nothing Returns Opens a folder/directory in a separate window API Declarations Code Directory = “C:”Shell “Explorer ” + Directory, vbNormalFocus’ The above code opens the C: directory as a new window

Expiredate

Expiredate, it’s very usefull for makers of shareware. It can worked for 30 days long or 60 days long. you can make new demo for. After expiredate your programma will not worked until customer pay to you. Original Author: Edward Tie API Declarations Code Option ExplicitDim day1 As IntegerDim month1 As IntegerDim basis As LongDim schrikbasis As LongDim e… Read More »

Rotating Cube Demo

The HELLO WORLD of 3D programming 🙂A rotating cube demo. You can adjust the rotation (clockwise or anticlockwise) and the speed by moving the mouse cursor towards the right and left edges of the form. Original Author: Theo Kandiliotis Inputs Nothing Assumptions This is Math stuff mostly,has little to do with VB’s methods. I used the Line method to… Read More »

TimeDelay

TimeDelay fuction is good for when you want to time out a loop, in milliseconds.Does’nt use a timer control, Uses simple api declare. Original Author: Mitch Mooney Inputs Delay as Long, milliseconds Assumptions Create a module with the following api declare and functionUsage can beDoFuncThatRetunsTrueMoreCodeEctEctLoop until ( FuncThatRetunsTrue=True) or (TimeDelay(60000)=True) Returns TimeDelay as boolean, turns turn if time reached,else… Read More »

Center a form – Short, Simple, and Sweet

This code allows you to quickly center a form within the screen without eating up alot of cpu time. Original Author: Scott Fitzhugh Side Effects none. The form gets centered. API Declarations Code sub form_load()me.left = (screen.width / 2) – (me.width / 2)me.top = (screen.height / 2) – (me.height / 2)end sub