Help with creating a label?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kimksmith
    New Member
    • Nov 2006
    • 1

    #1

    Help with creating a label?

    Hello All,
    I have a project where I first need to create an ActiveX control, in the form of a label. It has to have the following features:
    1. Changed colors - red, green & yellow.
    2. Default color is grey
    3. Need to have coordinates in relation to form
    4. Needs to be oval shape

    I am a beginner and would appreciate any help possible.

    kiM
  • albertw
    Contributor
    • Oct 2006
    • 267

    #2
    Originally posted by kimksmith
    Hello All,
    I have a project where I first need to create an ActiveX control, in the form of a label. It has to have the following features:
    1. Changed colors - red, green & yellow.
    2. Default color is grey
    3. Need to have coordinates in relation to form
    4. Needs to be oval shape

    I am a beginner and would appreciate any help possible.

    kiM
    hi

    Code:
    Function OvalLabel ( sName, sColor , sXpos , sYpos , sWidth , sHeight )
    Dim Ctrl As Shape
    Set Ctrl = Controls.Add("VB.Shape", sName)
    bColor=&H00404040&
    if not sColor=vbbullstring then bColor=sColor
    Ctrl.BorderColor = bColor
    Ctrl.Shape = 2
    Ctrl.Visible = True
    Ctrl.Move sXpos, sYpos, sWidth, sHeight
    
    End Function
    some use to you?

    Comment

    Working...