Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Label background not transparant

Status
Not open for further replies.

johnkoutstaal

Programmer
Joined
Aug 8, 2006
Messages
10
Location
NL
Hello VB users,

I am trying to place text in a circle with a transparent backcolor:

Script for the circle:
Graph.FillEllipse(myColor, X, Y, diamCircle, diamCircle)

The script for placing text on the circle:
Dim colorBlack As New System.Drawing.Color
Dim colorTrans As New System.Drawing.Color
colorBlack = System.Drawing.Color.Black
colorTrans = System.Drawing.Color.Transparent

Dim chTekst As New Label
chTekst.ForeColor = colorBlack
chTekst.Text = "H"
chTekst.Top = 75
chTekst.Left = 250
chTekst.Height = 20
chTekst.BackColor = colorTrans
Me.Controls.Add(chTekst)

The text goes trough the circle but the background text isn't transparant, can someone give information to get the background transparant or the same color as the circle??

Nice regards,
John.
 
Why use a label? Why not just draw the text?


Hope this helps.

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top