Category Archives: Visual Basic 6 (VB6)

Create/Check Access’ DSN in ODBC

Code You can use for check and (if not exist) create DSN for Access DB in ODBC. Original Author: Tair Abdurman Code ‘in module filePrivate Const KEY_QUERY_VALUE = &H1Private Const ERROR_SUCCESS = 0&Private Const REG_SZ = 1Private Const HKEY_LOCAL_MACHINE = &H80000002Private Const REG_DWORD = 4Private Declare Function RegOpenKeyEx Lib “advapi32.dll” Alias “RegOpenKeyExA” (ByVal hKey As Long, ByVal lpSubKey As… Read More »

Chat over the internet!

A chat application that allows chat over the internet using IRC.NOTE: There is an updated version of this code, I strongly suggest you download that version of it, since this version is missing a component. Original Author: Michael Barnathan Assumptions A very basic understanding of IRC would be helpful.. Side Effects I’ve never tested this on a network with… Read More »

Real-time fire (updated, 100 FPS)

This program simulates fire. I have seen other articles that simulate fire, but this one is extremely fast (95-102 FPS on my 366) and it uses some neat API calls that most programmers probably have never seen before. I uploaded this before, but it only worked if your computer was in 24-bit color mode. I have changed it… Read More »

MAKE THE KEYBOARD LIGHTS DANCE!!!!!

this is just a simple code demonstrating the use of the SendKeys function!!! other than that this code is for humor!!! to some this code is useless but this might be helpfull 2 someone, that’s why i submitted it. Plus this is pretty funny!!! Original Author: Im_[B]0ReD Assumptions put a command button on the form named Command1 Side Effects… Read More »

Active X MoveButton

Active X controla button that you can move on a form at runtime (using API’s releasecapture and sendMessage) Original Author: Thierry Morilleau Attachments File Uploaded Size CODE_UPLOAD263312311999.zip 9/3/2020 3:45:00 PM 10731

OleWord Activex ZIP File

This is an example of Ole automation with word (zip file)source code, OCX and demo includeThis is an ActiveX component to merge an access database with a word document. You can choose the database, the table,the fields and the document you want to merge at design time. You can place the fields wherever you want on the document… Read More »

Execute Control Panel Item

Allows the author to launch a Control Panel item (or .cpl file). Original Author: Will Smith Inputs The name of the .cpl file. Assumptions Windows Interface Side Effects Same effects of the Shell Command Code ‘Where Odbccp32.cpl is the name of the control panel item.Shell “rundll32.exe shell32.dll,Control_RunDLL Odbccp32.cpl”, vbNormalFocus

Set a Printer as default from Printers collection

Attempting to set the default printer to an object variable has no effect. For instance, given a system with more than one printer installed, the following code will not change the default printer: Set Printer = Printers(2). The expected behavior is that the document should print to the first non-default printer found in the printers collection. The actual… Read More »

ExtractFileName

It extracts a filename from a filepath. Original Author: D. de Haas Inputs A string comtaining a valide path & filename Assumptions Put this function in a module or the declaration section of a form in which this function is needed. Returns Returns only the filename Side Effects It only works with VB6, this of the function ‘StrReverse’ which… Read More »

Analog Clock with mouse control (Updated)

Analog Clock control where you can use your mouse to rotate the hours and minutes. Ideal to obtain time the graphical way from the user. Can also be used as a simple running time display. Left-Click and drag the minutes, Right-Click and drag the hours. Colours, fonts and some other attributes can be changed (look and see). This… Read More »