K
Kalvin
I keep getting my string inside a black box with this code.
I would like to make the background transparent. Any help on this will
be appreciated very much.
'**** BEGIN CODE ****
Try
Dim NewFont As New Font(fg.Font.FontFamily, 10, FontStyle.Regular)
Dim g As Graphics
Dim pic As Bitmap = New Bitmap(20, 20,
imaging.PixelFormat.Format24bppRgb)
g = Graphics.FromImage(pic)
g.Clear(Color.Transparent)
g.DrawString("H", NewFont, Brushes.Blue, 0, 0)
Dim st As New System.IO.MemoryStream
pic.Save(st, System.Drawing.Imaging.ImageFormat.Bmp)
Dim img As Image = Image.FromStream(st)
pct.Image = img
Catch exc As Exception
Stop
End Try
'**** END CODE ****
Kalvin
I would like to make the background transparent. Any help on this will
be appreciated very much.
'**** BEGIN CODE ****
Try
Dim NewFont As New Font(fg.Font.FontFamily, 10, FontStyle.Regular)
Dim g As Graphics
Dim pic As Bitmap = New Bitmap(20, 20,
imaging.PixelFormat.Format24bppRgb)
g = Graphics.FromImage(pic)
g.Clear(Color.Transparent)
g.DrawString("H", NewFont, Brushes.Blue, 0, 0)
Dim st As New System.IO.MemoryStream
pic.Save(st, System.Drawing.Imaging.ImageFormat.Bmp)
Dim img As Image = Image.FromStream(st)
pct.Image = img
Catch exc As Exception
Stop
End Try
'**** END CODE ****
Kalvin