Solved

VB6 ActiveX Control Design-Time Events

Posted on 2014-04-09
12
396 Views
Last Modified: 2014-04-16
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.
0
Comment
Question by:JedNebula
  • 6
  • 4
  • 2
12 Comments
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39989103
I don't believe so.
0
 
LVL 1

Author Comment

by:JedNebula
ID: 39989139
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.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39989181
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?
0
 
LVL 1

Author Comment

by:JedNebula
ID: 39989305
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.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39989471
Then the answer is definitely no since ActiveX controls are a part of VB6 code and not the IDE.
0
 
LVL 1

Author Comment

by:JedNebula
ID: 39991000
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.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 45

Expert Comment

by:Martin Liss
ID: 39992082
Sorry but I can't help and would have no objection if you closed this thread.
0
 
LVL 1

Accepted Solution

by:
JedNebula earned 0 total points
ID: 39993770
Looks like there was an MS article out there all along. Just had a hard time finding it:

http://support.microsoft.com/kb/179398

I've attached my sample project. The site didn't want to accept the project as a zip file so you'll have to download the text file and rename it to a 7z file. The password for the archive is K8KBRRUk34NH
sub-class-testing.txt
0
 
LVL 1

Expert Comment

by:dwe0608
ID: 39997665
I dont know that deleting this question is correct - the answer has been found and answered a query of mine about sub-classing.
0
 
LVL 1

Author Comment

by:JedNebula
ID: 39997715
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?
0
 
LVL 1

Expert Comment

by:dwe0608
ID: 39998002
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 ...
0
 
LVL 1

Author Closing Comment

by:JedNebula
ID: 40003499
Good old Google (eventually)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now