Dim stext As String = "Testing" Dim format As StringFormat = New StringFormat() Dim MyRect As Rectangle = New Rectangle(0, 0, 400, 800) Dim MyGraphics As Graphics = Me.CreateGraphics() Dim MyImg As Image = New Bitmap(391, 132, MyGraphics) Dim imageGraphics As Graphics = Graphics.FromImage(MyImg) imageGraphics.FillRectangle(Brushes.White, MyRect) format.Alignment = StringAlignment.Center format.LineAli`enter code here`gnment = StringAlignment.Center imageGraphics.DrawString("Testing", New Font("Times New Roman", 30, Drawing.FontStyle.Bold), Brushes.Black, RectangleF.op_Implicit(MyRect)) MyGraphics.DrawImage(MyImg, MyRect) MyImg.Save(Destfilename & "/" & "test.jpg")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)