|
-
Dec 5th, 2000, 06:15 AM
#1
Thread Starter
Frenzied Member
Let's say, that I want to make an ActiveX Control with a label, which the user can change the caption at, by typing fx. MyActiveX.Label1.Caption ="New Caption"
How is this possible???
-
Dec 5th, 2000, 06:31 AM
#2
Addicted Member
Activex / Caption
Hi,
You need to insert a standard Label in an empty Usercontrol in order to use MyActivex.Label1.Caption="My Activex is done".
Hope this can help you.
Michel Jr.
-
Dec 5th, 2000, 06:34 AM
#3
Thread Starter
Frenzied Member
No that's not what I mean 
The user has to be able to change the Caption of the lable at Run-Time, when I have compiled it and distributed it etc.....
-
Dec 5th, 2000, 07:17 AM
#4
Addicted Member
Why don't you use the Label1_Click event. When this one is triggerd then you make a textbox visible that will be on top of the label. You can't see the textbox normaly, because it's invisible. When you choose for the flat textbox it will look like the label has become white and the typing is no problem.
After that you take the textbox_Keypressed event to wait for the user to hit enter. When he does this isn't an enter in the textbox, but instead the textbox becomes invisible and you updat the label.
And what do you have. A label wich can be changed at runtime by the user. You can use the registery to save these label captions and the next you load, you have the same label in your form, but others can have there own.
Catch you later,
Jeroen Hoekemeijer
Code:
If 1 = 2 Then MajorError
-
Dec 5th, 2000, 07:20 AM
#5
Thread Starter
Frenzied Member
I have tried to insert my ActiveX containg the Label, but I can't change it......
-
Dec 6th, 2000, 05:47 AM
#6
Addicted Member
Activex/Label
Hi,
You need to set up some properties inside Visual Basic Wizar. You must do a relation between the Caption and the Label of the Usercontrol. So, when you change the Caption, the Label is updated automatically.
Michel Junior
-
Dec 6th, 2000, 06:05 AM
#7
Thread Starter
Frenzied Member
Hi!
Do you have some suggestions on how to do that??
-
Dec 7th, 2000, 11:47 AM
#8
Addicted Member
Activex
Hi,
1- Inside VB, go to Add-ins => Activex Control Interface Wizard menu.
2- Put Caption property inside the Selected Names box.
3- Click Next.
4- Click Next.
5- PUBLIC NAME MAPS TO
Caption CONTROL
Label1
MEMBER
Caption
6- Go ahead until finish it.
This procedure is to link the Caption property of the Usercontrol to the Caption property of the Label inside the Usercontrol.
This wizard menu is very useful when developing OCX. You must learn and get practice using it. It will help you a lot.
Hope this help you.
Michel Junior
-
Dec 7th, 2000, 12:31 PM
#9
Thread Starter
Frenzied Member
Thank you very much! I'll try it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|