transparent labels

nakracreative

Well-known member
Joined
Aug 1, 2005
Messages
72
Location
India
Programming Experience
1-3
Is it possible to have transparent labels in vb.net? Means if we place a label1 on another label, say label2, then will the text of label2 be visible ?
 
thanks a lot. but i have already tried that. it ceratinly makes th elabel transaprent but with respect to the form. my problem is making thi slabel transparent with another label. Where's Kurlon ? he might answer this one better. Oh God please send Kurlon.
 
from the beginning i didn't get you ... finally after your last PM ... :Dall

Ok, all you need to do is this:

on load event code:

VB.NET:
Label1.BackgroundImage = Image.FromFile(Application.StartupPath & "\backGround.jpg")
 
Dim canvas As Graphics = Graphics.FromImage(Label1.BackgroundImage)
 
Dim myString AsString = "DROP SHADOW EFFECT"
 
'this will create the "shadow", offset 4 pixels from the second position
canvas.DrawString(myString, New Font("Verdana", 20, FontStyle.Bold), New SolidBrush(Color.Black), 10, 10)  
 
'now draw over previous text
canvas.DrawString(myString, New Font("Verdana", 20, FontStyle.Bold), New SolidBrush(Color.White), 6, 6) 'set offset
 
canvas.Dispose()


Regards ;)
 

Attachments

  • DropAShadow.zip
    21.2 KB · Views: 44
Back
Top