Link to home
Start Free TrialLog in
Avatar of JedNebula
JedNebulaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB6 ActiveX Control Design-Time Events

I need to create an ActiveX control to support a legacy VB6 application.

I am wondering if it is possible to catch the design-time click event?

Regards,

Rawden.
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

I don't believe so.
Avatar of JedNebula

ASKER

I am struggling to find any sensible suggestions to it out there. Perhaps that is because you can't.

I was hoping to create a nicer looking version of the Microsoft Tabbed Dialog Control.

All I need to do, is allow the developer to change the current tab, by clicking in the control. The rest I can do in property pages.
I just read through part of my copy of Developing Visual Basic Add-ins and it says in the Menus and Toolbars chapter that
The VBE object has an Events child object, which in turn has a CommandBarEvents child object. This object receives the Click event of a menu or toolbar button. As we will see, this gives us the ability to place event code in a Click event for a menu or toolbar item.

Does that help at all?
I don't think so. An add-in is different from an ActiveX control. I have written add-ins in the past to extend the functionality of the IDE, but they must be installed via the add-in menu.
Then the answer is definitely no since ActiveX controls are a part of VB6 code and not the IDE.
It's not that I don't think you are right because, as much as I don't want to believe it, I doubt I am going to find a solution.

It's more curiosity now, than anything. I wonder how companies like Teebo and Arcadia are able to produce tab controls at all if they cannot respond to design-time click events.

Here is a video of a my dev environment.
Design-Time-Events

One of the control is a Combo box from Arcadia Controls which responds to Design-time Clicks to the down arrow.

My personal opinion is that it is possible to use the Windows API to intercept the messages, look out for click events and then match up the Handles. If they match, fire the control's event. I haven't got time to look into that myself, but I would be nice to know the method they use.
Sorry but I can't help and would have no objection if you closed this thread.
ASKER CERTIFIED SOLUTION
Avatar of JedNebula
JedNebula
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I dont know that deleting this question is correct - the answer has been found and answered a query of mine about sub-classing.
Is that what I've done? That wasn't my intention if I have. I was just trying to accept my own comment. Does that delete the question?
I actually dont know - it says "close Request Pending" - and I cant download the example project you uploaded as a txt ... hopefully moderator will sort it out and leave as is ... I answer my own questions periodically and I hope they weren't deleted ...

FYI I only logged the comment so if it were marked for deletion then it wouldnt be deleted ...
Good old Google (eventually)