Solved

VB6 ActiveX Control Design-Time Events

Posted on 2014-04-09
12
406 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
12 Comments
 
LVL 47

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 47

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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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 47

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
 
LVL 47

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

726 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