468,301 Members | 1,464 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,301 developers. It's quick & easy.

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
Nov 17 '06 #1
1 900
albertw
267 100+
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.

Similar topics

23 posts views Thread by Jason | last post: by
2 posts views Thread by DaWoE | last post: by
1 post views Thread by JNariss | last post: by
6 posts views Thread by D | last post: by
4 posts views Thread by Edward K. Ream | last post: by
9 posts views Thread by =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.