Results 1 to 9 of 9

Thread: ActiveX

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544

    Wink

    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???
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  2. #2
    Addicted Member Michel Jr's Avatar
    Join Date
    Jan 2000
    Location
    Brazil
    Posts
    175

    Smile 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.

  3. #3

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    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.....
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  4. #4
    Addicted Member jeroenh's Avatar
    Join Date
    Aug 2000
    Location
    Rotterdam, Holland
    Posts
    201
    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

  5. #5

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I have tried to insert my ActiveX containg the Label, but I can't change it......
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  6. #6
    Addicted Member Michel Jr's Avatar
    Join Date
    Jan 2000
    Location
    Brazil
    Posts
    175

    Smile 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

  7. #7

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    Hi!
    Do you have some suggestions on how to do that??
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  8. #8
    Addicted Member Michel Jr's Avatar
    Join Date
    Jan 2000
    Location
    Brazil
    Posts
    175

    Wink 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

  9. #9

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    Thank you very much! I'll try it!
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width