Please help i would want to pass a string to to it then return a barcoded image so that i can put it on my rdlc report
Dim barCode As String = txtBarcode.Text
Using bitMap As New Bitmap(barCode.Length * 40, 80)
Using graphics__1 As Graphics = Graphics.FromImage(bitMap)
Dim oFont As New Font("IDAutomationHC39M Free Version", 16)
Dim point As New PointF(2.0F, 2.0F)
Dim blackBrush As New SolidBrush(Color.Black)
Dim whiteBrush As New SolidBrush(Color.White)
graphics__1.FillRectangle(whiteBrush, 0, 0, bitMap.Width, bitMap.Height)
graphics__1.DrawString("*" & barCode & "*", oFont, blackBrush, point)
End Using
Using ms As New MemoryStream()
bitMap.Save(ms, ImageFormat.Png)
imgBarcode.ImageUrl = "data:image/png;base64," & Convert.ToBase64String(ms.ToArray())
imgBarcode.Visible = True
End Using
End Using