Category Archives: Visual Basic 6 (VB6)

ProgressBar for a program using MS Access

Shows you how you can use a progress bar while reading an MS Access database. This example uses two progress bars, one for reading each table, and the other for reading the entire database.Programmed using VB6, if you have a previous version of VB you can add the frm file to a new project (However, I have not… Read More »

A Must Have .bas File For VB Programming

A Must Have StartupModule.bas File. Lots Of Options. Original Author: T. L. Phillips Code Attribute VB_Name = “StartupModule”Option ExplicitPublic DBa(1 To 100) As StringPublic AppPathPublic DallorGetPublic FirstLoadPublic KeyBoardTypePublic KeyBoardRepeatDelayPublic KeyBoardRepeatSpeedPublic KeyBoardCaretFlashSpeedPublic CurDatePublic Ret As StringPublic ReturnINIdatPublic INIFileFoundPublic ShortFNamePublic titlePublic FileInfoName As StringPublic FileInfoPathName As StringPublic FileInfoSize As StringPublic FileInfoLastModified As StringPublic FileInfoLastAccessed As StringPublic FileInfoAttributeHidden As StringPublic FileInfoAttributeSystem As… Read More »

Convert TimeStamp To String

Converts the timestamp data type of SQL server into a string that is then suitable for use in a where clause Original Author: Thomas Robbins Code Public Function CvtTimeStamp(TimeSt As String) As String’ This function will recieve the eight byte string of binary data’ returned as the value of a timestamp column and convert it into’ as string in… Read More »

game – 4000 A.D.

A turn-based strategy game of galactic exploration and conquest. Original Author: Gordon Stewart Assumptions Just unzip into a directory, and open up the project into the VB IDE. Attachments File Uploaded Size CODE_UPLOAD206.zip 9/3/2020 3:45:00 PM 1088059

Always On Top

Keeps Your Form On TopThis Is Really Kewl Because You Can Just Use A false attribuite to set it as not on top instead of using 2 functions Original Author: Adam Jacob Muller API Declarations Declare Function SetWindowPos Lib “user32” _(ByVal hwnd As Long, _ByVal hWndInsertAfter As Long, _ByVal X As Long, _ByVal Y As Long, _ByVal cx As… Read More »

A Key Logger

It Logs Your Key PressesPlace This Code In A Timer On Interval Less Then 20 The Faster It Is Thebetter But It Consumes More System Rescources Original Author: Adam Jacob Muller API Declarations Declare Function GetAsyncKeyState Lib “user32” (ByVal dwMessage As Long) As Integer Code ‘Place This Code In A Timer On Interval Less Then 20 The Faster It… Read More »

Color RGB from a Long Using “Point” method

After using the POINT method the computer returns a long value like 16711680 but with this function it will return the color in the RGB(R,G,B)format. Original Author: Brandon Brownlee Assumptions Start a new project and make any picture you have the background for your form.Then start it and move the mouse on the form and look at the caption… Read More »

Animation Caption.

Quick and Easy! without API. Only a few lines of code.You can scroll your Application’s titles and form’s caption.I hope you enjoy.G.B.R.Nilantha Athurupana.Wattarama,Imbulgasdeniya,Sri Lanka.(94-03744479, E-Mail: crysbro@cga.lk) Original Author: G.B.R.Nilantha Athurupana Assumptions Create a new form (Any Name you can use). Add a Timer control (Timer1) Code ‘General DeciarationsDim C As String ‘to store current form’s captionDim CO As Integer… Read More »

Get Command Line Parms

This Will Return The Command Line Options That Your Program Was Run With EX if a person used a command line to run yourapp.exe /option then mycommandline would return /optionPLUS IT’S ONLY 1 Line Of Code Original Author: Adam Jacob Muller Returns The Command Line Option Side Effects None To Date Code MyCommandLine = Trim(UCase(Command()))

CreateFolders

Make nested subfolders in a single method. Original Author: Gerald Bryant Inputs sPath: Fully-qualified absolute or relative path you wish to create.‘Example 1: \NetworkVolumeNetworkShareExistingDirNewDirNewSubdirNewSubDir‘Example 2: C:Program Filesacdefghijklm opq s uvwxyz Assumptions Add reference “Microsoft Scripting Runtime” (scrrun.dll) available at http://www.microsoft.com/scripting or with VB6. Side Effects Number 70, Permission Denied error will occur is write access or directory create access… Read More »