I am trying to draw labels over a graduated image so that image shows through the label rather than the form's background colour
For some reason, the text wont show up although the graduated image is being displayed
My code is
Can anyone help?
Cheers
Snuv
"If it could have gone wrong earlier and it didn't, it ultimately would have been beneficial for it to have." : Murphy's Ultimate Corollary
For some reason, the text wont show up although the graduated image is being displayed
My code is
Code:
Friend WithEvents picBackground As System.Windows.Forms.PictureBox
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
Me.picBackground.Image = resource.Image
DrawString("test",552,200)
End Sub
Private sub DrawString(ByVal str as String, ByVal x as Integer, ByVal y as Integer)
Dim xgraphics As Graphics
xgraphics = Me.picBackground.CreateGraphics
Dim col as Color = Color.FromArgb(255, 255, 255)
Dim f as Font = New Font("Microsoft Sans Serif", 8.25)
dim b as Brush = New SolidBrush(col)
xgraphics.DrawString(str, f, b,x,y)
xgraphics.Flush
End Sub
Can anyone help?
Cheers
Snuv
"If it could have gone wrong earlier and it didn't, it ultimately would have been beneficial for it to have." : Murphy's Ultimate Corollary