Category Archives: Visual Basic 6 (VB6)

Kewl 3D Star Field! User can change camera angle!

This code generates a moving 3D star field, almost identical to the windows ‘flying through space’ screen saver, except this runs in a window of any size, and when the user moves the mouse over it, they can change the camera angle, which I suppose could make a neet game back ground for an outter space filght sim.… Read More »

Enter to Tab

This code gives the “enter” key the same functionality as the “tab” key in a vb form. When the user presses the “enter” key, it moves the focus to the next control, based on the tab index order. Don’t forget to set the KeyPreview property of the form to True. (My thanks to Pennington. His TabToEnter2 code laid… Read More »

**A Bouncing Ball**

This code shows a circle bouncing off of the sides of the form like Jezzball (But not as good). Original Author: Ben Doherty Assumptions you need to make 2 timers named Timer1 and Timer2, make a circle shapeand name it pic. set the background color to black. Code Private Sub Form_Load()Form1.Height = 4770Form1.Width = 5865Form1.BackColor = &H0pic.BorderColor = &HFF&pic.Top… Read More »

Error Handler Document

This code pastes into a Module that Create (if not exists) a MDB to record the errors that occur in your application. Original Author: WalkerBro Inputs Needs (DatabaseName, Date, Err.Number, Err.Description, PrivateNotes, Optional(User))Load in “References” the “Microsoft DAO 3.51 Object Library” Assumptions Basic Error handling information. Returns True or False if it was succesful. Side Effects No known side… Read More »

MP3Snatch v2.0

This revised code finally supports the MP3 “Genre” tag (WinAMP 2.22+ compliant).Loads of you have emailed me requesting this facility – I think this is the first such VB code to support it! Easy to implement and the new genre routine is compact. It was a right pain in the arse collecting the Genre descriptions 😉 Note:- A… Read More »

ChangeRes

This Function will change your Windows Resolution. It is very simple, and it does what most Resolution Change Functions don’t do, it changes the the Bits Per Pixels as well as the Screen Width and Height. Original Author: ScAnFrEaK Inputs Dim RetValue As IntegerRetValue = ChangeRes(800, 600, 32) Returns 1 = Resolution Successfully Changed0 = Resolution Was Not Changed… Read More »

Set Icons for any Form or Program

With this code you can place any Icon in the title bar of any Window, just by reffering to a .ico file or to the position of the Icon in a DLL. Original Author: J. van Gils Inputs Handle of the window you want to change the icon of. Assumptions You need to have the Window Handle (hWnd) of… Read More »

Form bouncing against the Start Menu at exit! 2.0

This code is a must have! It’s cooler than the “Cool Form Close” code , cooler than the “Implode and Explode” code! So what does it do? When you close you program a really cool effect will appear. Your form will shrink so just the Titlebar is being showned, then the titlebar accelerates and bounces againt the start… Read More »

Dictionary, or Anything Else to store stuff

you enter a word, or whatever else you want and it brings up a definition, or something else.Note: Saves into the registry key: HKEY_Current_UserSoftwareVB and VBA Program Setting whatever you set the path to Original Author: Tyler Robbins Assumptions create 4 textboxes name them:AddName, AddDefine, definition, Wordcreate 1 label, label3 (make its caption blank)make 2 command buttonsname them:LookUp, AddWord… Read More »

Spell Checker (uses MS Word)

This code uses OLE Automation to allow VB to open an instance of MS Word if the user has it on their system and spell check the contents of a text box. It could easily be modified to work with any control that has text on it. I would recommend better error control than the On Error statement… Read More »