The VBEventWindow control which adds a large number of new events to a Visual Basic form, such as Move when the form is moved, ActiveApplicationChanged when the user switches to or from your application and a large bunch more.
VBSysTrayCtl which uses RegisterWindowMessage to get around th eproblem of having to piggyback an existing message to allow you to add an icon to the system tray and interact with it.
I'd be interested in your comments on both - in particular, what extra events should be added to the first?
These and the others you advertised are very nice Merrion - but I think we'd all appreciate source code for all of them. You included it for the image map - which is great, cos ive been struggling to write one of them for a while, and will look forward to reading it, but can we have it for the rest as well??
Chuck Norris ordered a Big Mac at Burger King, and got one.
Public Event ActiveApplicationChanged(ByVal ActivatingThisApp As Boolean, ByVal hThread As Long, Cancel As Boolean)
This is fired when the user is switching to or from your application.
Public Event LostCapture(ByVal hwndNewCapture As Long, Cancel As Boolean)
This is fired when the focus switches to another window in your application's thread...for example in an MDI app when you switch between child forms.
Public Event KeyPressed(ByVal VKey As Long, ByVal Repetition As Long, ByVal scanCode As Long, ByVal ExtendedKey As Boolean, ByVal AltDown As Boolean, ByVal AlreadyDown As Boolean, ByVal BeingPressed As Boolean, Cancel As Boolean)
Occurs when a key is pressed while your window has the focus. This is similar to Form_Keypress.
Public Event LowMemory(ByVal TimeSpentCompacting As Long)
This is triggered when the system is having to free up any available memory because it is running low.
Public Event Move(ByVal x As Long, ByVal y As Long, Cancel As Boolean)
This event occurs when the user moves your form (bit of an ommision by MS in my opinion)
Public Event VerticalScroll(ByVal Message As enScrollMessages, ByVal Position As Long, Cancel As Boolean)
Public Event HorizontalScroll(ByVal Message As enScrollMessages, ByVal Position As Long, Cancel As Boolean)
Public Event WindowsSettingsChanged(ByVal NewSetting As enSystemParametersInfo)
Public Event WindowsINIChanged(ByVal Section As String)
Public Event NonClientMouseMove(ByVal Location As enHitTestResult, ByVal x As Single, ByVal y As Single) Public Event NonClientMouseDown(ByVal Location As enHitTestResult, ByVal Button As Integer, ByVal x As Single, ByVal y As Single) Public Event NonClientMouseUp(ByVal Location As enHitTestResult, ByVal Button As Integer, ByVal x As Single, ByVal y As Single) Public Event NonClientDblClick(ByVal Location As enHitTestResult, ByVal Button As Integer, ByVal x As Single, ByVal y As Single)
These provide mouse messages for the non-client area of your Visual basic form
Public Event MinMaxSize(MaxHeight As Long, MaxWidth As Long, MaxPositionTop As Long, MaxPositionLeft As Long, MinTrackWidth As Long, MinTrackheight As Long, MaxTrackWidth As Long, MaxTrackHeight As Long)
This event is fired when windows wants to resize your form, in response to the user clicking on maximise, moving the form or drag-resizing your form. By altering the parameters in you can get tight control over where your form can and cant be moved/resized to.
[/i]Public Event MouseOverMenu(ByVal Caption As String)[/i]
This is fired when the mouse moves over a top level menu. You can use this event to update the context sensitive help or status bar, for example.
Public Event WindowMessageFired(ByVal msg As WindowMessages, ByVal wParam As Long, ByVal lParam As Long, Cancel As Boolean, ProcRet As Long)
This is fired for all the other windows messages - basically it is a subclasser.