by Slider (19 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (10 Votes)
This project was put together as a learning tool to better understand how to capture Windows Messages using subclassing within a OCX.
Capuring Windows Messages in a executable is very straight forward - however within an OCX, it's a whole new dimension. This project demonstrates how to overcome the difficulties without using thrid-party products or external DLLs.
Keep your eye on both the Immediate Window and the UserControl's ListBox in both Design-time and run-time whilst resizing, minimising, maximising, moving, clicking, etc to better understand how the UserControl and Windows Messages Work.
I hope that you get the same benefit from using this code as I did coding it!