Results 1 to 2 of 2

Thread: Drawstring IN VB.NET

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    7

    Drawstring IN VB.NET

    I am trying to mark the pixel using the

    PictureBox1.CreateGraphics.DrawString("x", New Font(Font, FontStyle.Bold), New SolidBrush(Color.Red), New PointF(e.X, e.Y))

    on mouse down event

    My problem is, the String is marked below the chosen pixel.
    Anyway to correct this offset. or is there any other way to mark the point on image on mouse down.

    Thanks

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You can use this as a workaround .

    VB Code:
    1. Me.Label4.CreateGraphics.DrawString("x", New Font(Font, FontStyle.Bold), New SolidBrush(Color.Black), New PointF(e.X - 5, e.Y - 5))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width