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 »

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”) & “”

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

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 »

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 »

AppOnTop

How do I get my application on top?To make your window truly topmost, use the SetWindowPos API call Original Author: VB FAQ Assumptions You can, to make the application stay on top, put the ZOrder method in a Timer event repeatedly called, say, every 1000 milliseconds. This makes a “softer” on-top than other methods, and allows the user to… Read More »

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

access 97 password recovery

Forgot your access 97 password?Never fear this function willhack the access 97 local filepassword Original Author: Tom Pickles Inputs an access 97 file with local password set Assumptions I hope this code will end the commercial password recoverers Returns the password API Declarations Original code translated direct from c snippet by Casper RidleyFrom the c code at http://www.nmrc.org/Turned into… Read More »

IP Break Out Box

IP Break Out Box is a program that sits between a client program and a server. Once activated it displays every bit of data exchanged between the client and the server. Example: Set the remote host = www.yahoo.com, remote and local port = 80, Then click listen. next open up your web browser and type in the ip… Read More »

cmdFormatDrive

Format Floppy Disk using API:Here is the code on How to Format Floppy Disk using API. Note — This code can format your Hard Disk as well, so you should be careful!!!! Original Author: Duncan Diep API Declarations Private Declare Function SHFormatDrive Lib “shell32” _(ByVal hwnd As Long, ByVal Drive As Long, ByVal fmtID As Long, _ByVal options As… Read More »