Solved

Handle ActiveX properties

Posted on 2001-06-05
5
157 Views
Last Modified: 2010-05-02
Hi

I'm creating UserControl with TreeView control on it.
Can I handle TreeView properties (invoke properties dialog box) at design time like i do it with common TreeView?

p.s. TreeView is stretched on whole UserControl area, so user haven't to see any diferences working with it.
0
Comment
Question by:vterekh
[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
5 Comments
 
LVL 14

Expert Comment

by:puranik_p
ID: 6155732
There is one ActiveX control Interface wizard.
It will do everything you want to do for you.
which includes mapping tree view - properties to the control.
Try it!
0
 
LVL 1

Author Comment

by:vterekh
ID: 6155745
Yes
I can add some methods and properties to user control that way. But can I invoke TreeView property sheet by right click on the user control at design time and choose Property item in the popup menu?
0
 
LVL 15

Accepted Solution

by:
ameba earned 50 total points
ID: 6156135
This is not impossible with some hacking, but I would suggest using 'multicasting' technique:

Your control user adds Treeview to his form, and you declare it by 'withevents' statement.
Then both you and your control user can modify Treeview control and handle its events.

Simple sample: http://www.thescarms.com/vbasic/SubClassTxt.asp
(instead of creating new usercontrol for 'BetterTextBox', it uses a simple class to add functionality)
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7132892
Hi vterekh,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept ameba's comment(s) as an answer.

vterekh, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with my recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7167836
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

615 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