B4J Question Picturebox / Image drawstring TO B4

h725

Active Member
Licensed User
Longtime User
Hello everybody !

I am using to following snippet to draw a string in a Bitmap
which is shown in a picturebox:

B4X:
dim pbstring as string = "abcde"
Dim pb As New PictureBox()
Dim bmp As New Bitmap(220, 320)
pb.Image = bmp
Using g As Graphics = Graphics.FromImage(bmp)
g.DrawString(pbstring, New Font("Arial", 12), Brushes.Black, 10, 10)
FlowLayoutPanel1.Controls.Add(pb)

Is there a way to do this in B4J?

Thank you in advance

Kind regards
h725
 
Top