Results 1 to 4 of 4

Thread: ActiveX Control - Change Background Color ?

  1. #1

    Thread Starter
    Addicted Member tcurrier's Avatar
    Join Date
    May 1999
    Location
    Northeastern Pa./USA
    Posts
    255

    Red face ActiveX Control - Change Background Color ?

    I'm new to ActiveX controls, so maybe I'm missing something basic here, but my problem is : I can't change the background color of the control at run time. I can change the background color of other controls within the ActiveX control, but not the color of the ActiveX control itself.

    I can say :
    Text1.backcolor = vbyellow
    Command1.backcolor = vbred

    ... but what can do for the control itself ?
    VB6 Enterprise SP4

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Use this

    UserControl.Backcolor = vbblue

    whenever you are working with the activex(making the control), the name of your activex control(parent) is always

    UserControl
    Baaaaaaaaah

  3. #3

    Thread Starter
    Addicted Member tcurrier's Avatar
    Join Date
    May 1999
    Location
    Northeastern Pa./USA
    Posts
    255
    Thanks... that worked great. I do have one more question. I want to put a button on the control, that when clicked, will make the control invisible. I know I can do this from another form that has the control as a component by saying 'mycontrol.visible = false', but it is possible to do this within the user control itself ?
    VB6 Enterprise SP4

  4. #4
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    There is no way to make you activex control invisible when a button is clicked which is on the activex control that i know of. But there is a property like "usercontrol.InvisibleAtRuntime". It allows your control to be invisible at runtime.

    i hope this helps
    Baaaaaaaaah

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