Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Public Sub DString(ByVal p As PictureBox)

       Dim imageRect As Rectangle = New Rectangle(0, 0, p.Image.Width, p.Image.Height)

       Dim G1 As Graphics

       G1 = p.CreateGraphics

       G1.DrawString("hola", New Font("Verdana", 24), Brushes.Black, p.Width / 2, p.Height / 2)

   End Sub

 

 

this code draw string on the picture box it self .

How I can draw the string to the image inside the picture box control and save the image with string .

 

thank you ..

  • Leaders
Posted

Did you try it? It's exactly has he says:

Create the graphics object using

GFX = Graphics.FromImage()

and pass in the Image property of the picturebox

GFX = Graphics.FromImage(PB.Image)

 

Use this Graphics object to draw to the string.

GFX.DrawString(...)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...