11 API Functions for VB6

By | 2019-04-07

Here is another handy module from extreme-vb.net. This one covers eleven (11) API-based functions.

Notice

This content originally appeared on on extreme-vb.net. Permission from Bob Schwarz has been granted to included it here for archival purposes.

We can’t reach the future without a bridge to the past.

The below table contains a list of the functions, along with a brief explanation of what each one does.

Function NameDescriptionInputOutput
PausePuts the app to sleep for the given number of millisecondsLong Integer 
ExitWindowsLogoff, shutdown, or reboot the computer.Long Integer 
GetUserNameReturn the username of the logged on user String
GetComputerNameReturn the name of the local computer String
GetActiveWindowTitleReturns the title of the active windowBooleanString
HideTaskBarHides the taskbar  
ShowTaskBarUn-hides the taskbar  
GetActiveWindowReturns the handle of the active windowBooleanLong
GetWindowTitleReturn the title of a window given its hwndLongString
TopMostFormMakes a form the top window if top = True. When top = False it removes this propertyobject (form), boolean 
AboutBoxGenerates a standard windows About boxobject (form), Variant 

Attachments

FileUploadedSize
389-20190407-062702-basAPI.zip4/7/2019 6:27:03 AM1583
Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.