REGISTERING HOT KEYS - intermediate level
by Ken Lewis kenlewissr@sbcglobal.net

Home

Liberty BASIC News
Safe Registry and Ini File Alternative
Deleting and Renaming Disk Files
Segments and Flushing
Flat Toolbar with Toolips
Translating 32-bit VB API Calls
Event-Driven Programming Concepts
Spotlight on the Community!
ODBC in Liberty BASIC
Hex Viewer
Listing Files Recursively
Registering Hot Keys
Preventing more than 1 instance
Multi-Coloured Text Input Boxes
Images on Buttons and Statictext
Two Demos by David Conner

Editor's note: The introduction to Ken's article is copied here. Please see the DOC version in the attached zip file for a beautifully formatted article, along with a well-organized demo. Thanks, Ken!

***********************************
Setting up HotKeys for your program
Liberty BASIC v3.02

This article will discuss setting up hot keys to activate a function in a program that is running. This article does not cover the type of hotkey used as a keyboard shortcut to start a program, or the type that snaps your window to the top. Although this could be done with the type of hotkey we will discuss.

I decided to write a program that would take a screen shot of the desktop, the active window or the client area of the active window. In order to do this without a program window showing, I had to discover how to use HotKeys. I thought this information might be useful to other users, so I am sharing it here.

If you plan to use the Windows API, I suggest that you download the Win32api.txt file that can be found in the files area of the [libertybasic] group on yahoo. You will also need the Platform SDK or a similar reference, for explanations of the variables used in the API calls. I have spent many hours browsing through the Win32api.txt file, looking for functions that might be useful to me at sometime in the future. This is how I knew the RegisterHotKey function existed, and this is where I will start.

The Win32api.txt file is a list of API calls in Visual BASIC format.




Home

Liberty BASIC News
Safe Registry and Ini File Alternative
Deleting and Renaming Disk Files
Segments and Flushing
Flat Toolbar with Toolips
Translating 32-bit VB API Calls
Event-Driven Programming Concepts
Spotlight on the Community!
ODBC in Liberty BASIC
Hex Viewer
Listing Files Recursively
Registering Hot Keys
Preventing more than 1 instance
Multi-Coloured Text Input Boxes
Images on Buttons and Statictext
Two Demos by David Conner