Category Archives: Microsoft

Open your Default Browser to a Website

This is a simple, yet very useful One Line code, that will open your (the user) Default Web Browser, and send you to a user specified URL. Original Author: Stephen Glauser Inputs URL Code Sub OpenUrl(URL As String)Rem Written by Stephen GlauserRem Last Update: August 1, 1999Rem This will the users Default Web BrowserRem and send them to the… Read More »

TimeOut !

This is a neat little Sub that will Cause a Pause or “Time Out” in your program. Original Author: Stephen Glauser Inputs Duration (1 equals 1 Second, .5 equals a Half Second) Side Effects This will cause the program to wait the specified duration before continueing. Code Sub TimeOut (duration)StartTime = TimerDo While Timer – StartTime < duration  X =… Read More »

Scrolling Picture Control

The Control Will Take an Image And Scroll it Across It’s Parents Background.There Are 8 Directions To Choose From, And All The BitBlt Styles Are Availiable.This Control Has Only Been Tested In VB6. It May Need Minor Modifications To Work On VB5, If This Is The Case Please Notify Others in the feedback section. Original Author: Arvinder Sehmi Inputs… Read More »

Pixel Collision Detect

This program demonstrates how to perform accurate pixels collision detection. Most vb games use the Extent collision detection method, which is fast, but not very accurate. This program shows how to detect when the objects touch. It also shows how to use the BltBit function and create memory DC’s. Even if you have never tried any of these… Read More »

Allow only numbers in a textbox!

This program won’t allow any other characters in a textbox then numbers and it allows you to use your Backspace key. Original Author: RayDance Code Private Sub text1_KeyPress(KeyAscii As Integer)  Dim Numbers As Integer  Dim Msg As String    Numbers = KeyAscii    If ((Numbers < 48 Or Numbers > 57) And Numbers <> 8) Then   Msg = MsgBox(“Only Numbers are aloud in this Textbox”,… Read More »

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 »