Event Spy Control: Capture Numerous Events Not Exposed by VB.

Category:
System/API
Type:
Controls
Difficulty:
Advanced
Author:
Merrion Computing

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
Simply add this control to your form and set one property and get a whole gamut of new events such as:
  • ActiveApplicationChanged - Fired whenever someone switches to or from your application.
  • KeyPressed - Fired whenever ANY key is pressed
  • Move - Fired when the user moves your form (I can't believe MS didn't include this one as standard)
  • NonClientMouseMove,NonClientMouseDown,NonClientMouseUp,NonClientDblClick - Like the standard mouse events, only for the non client area of your form (caption, menu, frame etc)
  • MinMaxSize - Fired whenever windows is deciding how to size your form...provides a classy way of restricting the minimum and maximum sizes your form can be resized to.
  • MouseOverMenu - Fired when the mouse moves over a top level menu...so that you can update your statusbar message accordingly.
  • WindowMessageFired - Provides access to all the other windows messages.
Included is a .vbg with a simple sample client project.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download eventctl.zip