By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,407 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

Help with creating a label?

P: 1
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
Nov 17 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 267
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

Expand|Select|Wrap|Line Numbers
  1.  
  2. Function OvalLabel ( sName, sColor , sXpos , sYpos , sWidth , sHeight )
  3. Dim Ctrl As Shape
  4. Set Ctrl = Controls.Add("VB.Shape", sName)
  5. bColor=&H00404040&
  6. if not sColor=vbbullstring then bColor=sColor
  7. Ctrl.BorderColor = bColor
  8. Ctrl.Shape = 2
  9. Ctrl.Visible = True
  10. Ctrl.Move sXpos, sYpos, sWidth, sHeight
  11.  
  12. End Function
  13.  
  14.  
some use to you?
Nov 17 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.