Category Archives: Microsoft

Cool screen wipes

You can achieve some cool form wipes with judicious use of the Move method. For example, to draw a curtain from right to left use this routine. It is also possible to wipe a form from bottom to top, and from both sides to the middle, using similar routines Original Author: VB Pro Code Sub WipeRight (Lt%, Tp%, frm… Read More »

AutoCompleter – Class Module

This code allows you to have an autocomplete function on any text boxes by creating an instance of the class module below and setting a text control on a form to is CompleteTextbox property. Ideal for those situations when you have multiple autocompletes. (Visual Basic 6 Only – Can easily be modified for 5.0 users) Original Author: dmbbob Inputs… Read More »

Docking Windows in an MDI Environment

This code enables you to have an MDI Child form “dock” with the MDI form like the toolbar found in the VB5/6 IDE and in various other applications. It can dock to any of the four sides of the form. Currently only support for one toolbar is there (i.e. the toolbar in VB as opposed to the project… Read More »

Avoiding use of null

How do you avoid the “Invalid use of null” error when reading null values from a database?If you try to retrieve a null value (empty field) from a database, you will get the error: “Invalid use of Null”. Here is one way to get around this problem: .. Original Author: VB FAQ Code TextBox.Text = MyTest.Fields(“TestFld”) & “”

A Super Easy Delay Timer

A delay timer so easy, this paragraph is longer. I had to submit this easy code because it is not on this website. Uses no API, and it is very handy!! Original Author: Patrick K. Bigley Assumptions Make a form with a command button ont it. Paste the code into the command button. This sample has a 3 second… Read More »

Sounds

Here is what I did to make my PC speaker beepat the frequency and length of time I want,using hardware direct control.It works fine in Win95 and Win98. Not in WinNT. Original Author: Jorge Loubet Assumptions Read comments of Win95IO.dll from SoftCircuits API Declarations In code, as private declarations Code ‘*****************************************************************’  October 17 1999- By Jorge Loubet’  jorgeloubet@yahoo.com’  Durango, Dgo. Mexico.’  Hola amigos… Read More »

Changing Windows Printer w/o using priint dialog

How can I change the printer Windows uses in code without using the print common dialog? How can I change orientation?You can change the printer the VB 3.0 Printer object is pointing to programmatically (without using the common dialogs). Just use the WriteProfileString API call and rewrite the [WINDOWS], DEVICE entry in the WIN.INI file! VB will instantly… Read More »

Launch file and associated program

How do I launch a file in its associated program?The Shell statement unfortunately only supports launching an EXE file directly. If you want to be able to launch, i.e. Microsoft Word by calling a .DOC file only, you can make your VB application launch the associated program with the document using the following method: Original Author: VB FAQ API… Read More »

Access Password Finder (97 and 2000)

*** Updated on 10/18/99 –> See comments below ***This is a handy little routine for retrievingforgotten passwords out of Access97 and 2000.Do not abuse this. This should be used only fordatabases you originally had permissions to andforgot the password. Original Author: Dan Fogelberg Attachments File Uploaded Size CODE_UPLOAD1331.zip 9/3/2020 3:45:00 PM 4951

StopTextBoxFromBeeping

Show how to make a text box not beep but do something else when I hit the Enter key. This code example makes nothing happen, for an extended period of time: Original Author: VB FAQ Code Sub Text1_KeyPress (KeyAscii As Integer) If KeyAscii = 13 Then ’13 is Key_ReturnKeyAscii = 0End If End Sub