CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Mar 2008
    Posts
    142

    adding text in picture

    i want to add text on the picture
    i have three forms
    form1 for opening picture
    form2 for displaying and this contains one picturebox
    form3 for add text
    form3 has a button and a text field
    i enter the text in text field and press the button but text is not added
    code for adding text
    Code:
    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
            Dim addText As String
            addText = txtAdd.Text
            Form2.PictureBox1.CreateGraphics.DrawString(addText, New Font("Arial", FontStyle.Bold), Brushes.Black, 10, 25)
            Form2.PictureBox1.Refresh()
            Me.Close()
        End Sub
    plz tell me where i m wrong
    see the attachment also
    thanks
    Attached Files Attached Files

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

Featured