Category Archives: Microsoft

control subclassing switchboard

The Switchboard:A method for handling subclassing in ActiveX controlsf you develop ActiveX controls and intend to subclass or hook a window, you’ll very quicklydiscover a problem when you attempt to site multiple instances of your control. The subclassing,which worked fine with a single instance of your control, now no longer works and is, in fact, mostlikely is causing… Read More »

Excelent Plasma effect!!!

Displays a plasma fractal and cycles the colours.Sorry no docs for this code, not got round to it yet:) Original Author: Jason Singleton API Declarations SetPixel,CopyMemory Attachments File Uploaded Size CODE_UPLOAD357.zip 9/3/2020 3:45:00 PM 11543

The 15 minute WWW browser

It took Netscape months to create their first browser, and Microsoft wasnt able to follow up that trick until years later. But you can create a world wide web browser in less than 15 minutes, even if you are a Visual Basic novice! The following tutorial will show you how to create an Internet browser using the Microsoft… Read More »

Close/open the CD Rom door

Open and close the CD rom door from code! Note:comment out the unneeded api declaration (16 or 32 bit) depending on what operating system you are using! Original Author: Visual Basic On Line User Group API Declarations ‘for 16 bit windowsDeclare Function mcisendstring Lib “MMSystem” (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal wReturnLength As Integer, ByVal hCallback… Read More »

Printing a Microsoft Access Report from Visual Bas

How to print a Microsoft Access report from within VB. Also, VB 16-bit. (by Jose Garrick) Original Author: anonomous (or see description) Code Access 2.0 can be controlled using DDE, while Access 7.0 and later can be controlled using OLE Automation. In both cases, you are generally limited to what is available as a DoCmd statement/method. I’ll assume for… Read More »

TaskManager

Here’s a simple application to function like the Windows Task Manager… Original Author: Found on the World Wide Web Assumptions Start‘ a new project and add the following controls to the form:‘ Control Name Caption‘ ———————————————————-‘ commandbutton cmdRefresh Refresh‘ commandbutton cmdSwitch Switch‘ commandbutton cmdExit Exit‘ listbox lstApp API Declarations ‘for 16 bit (VB3 and VB4-16) use these:Declare Function ShowWindow… Read More »

CapsLock and NumLock

How to Activate CapsLock and NumLock from Code Original Author: Ian Ippolito (psc) Assumptions The keyboard APIs for VB4-16 and VB3 do not support the byte data type.By changing the Windows constant to Public Const VK_NUMLOCK = &H90, you can use the above to activate the NumLock key. API Declarations Public Const VK_CAPITAL = &H14Public Type KeyboardBytes?á?á?á?á?ákbByte(0 To 255)… Read More »

DegreesToXYsubroutine

The DegreesToXYsubroutine, calculates the X (horizontal) and Y (vertical) coordinates of any point, measured in degrees, on the circumference of a circle or ellipse. Original Author: Found on the World Wide Web Inputs Pass the subroutine the center X, Y of your ellipse, the degree position,and the horizontal and vertical radii (if they are equal, you’re specifying acircle, if… Read More »

Win95DirectoryPrompt

Prompting the User for a Directory in Win95. Windows’ common dialogs are great if you want the user to select a file, but what if you want them to select a directory? Call the following function, which relies on Win32’s new SHBrowseForFolder function: Original Author: Found on the World Wide Web API Declarations Private Type BrowseInfohWndOwner As LongpIDLRoot As… Read More »