Results 1 to 5 of 5

Thread: Insert Picture into a Rich Text Box?[Resolved]

  1. #1

    Thread Starter
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57

    Question Insert Picture into a Rich Text Box?[Resolved]

    How can I insert a picture into a ritch Text box?
    And Or
    How copy a bitmap/pictureFile to the clipboard?
    Last edited by JesusFreak; Feb 28th, 2003 at 10:02 AM.
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Richtextbox1.Paste()

    As for putting something in the clipboard, from where are you trying to get this picture?

    CTRL+C

  3. #3

    Thread Starter
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57
    Originally posted by Edneeis
    Richtextbox1.Paste()

    As for putting something in the clipboard, from where are you trying to get this picture?

    CTRL+C
    I want to get the picture from a file.
    Can you insert a picture into a Rich Text Box if it isn't on the clip board?
    ex.
    RichTextBox1.Insert("C:\test.bmp")
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    VB Code:
    1. 'get image object from file
    2.         Dim img As Image = Image.FromFile("C:\windows\Soap Bubbles.bmp")
    3.         'set image in clipboard
    4.         Clipboard.SetDataObject(img)
    5.         'paste into the rtb
    6.         RichTextBox1.Paste()

    You may want to write some code to preserve any items already in the clipboard if you want. Just store it as an object then set it again after the paste.

  5. #5

    Thread Starter
    Member JesusFreak's Avatar
    Join Date
    Feb 2003
    Location
    Headed for Heaven
    Posts
    57
    Thanks!
    That if you confess with your mouth, "Jesus is Lord," and believe in your heart that God raised him from the dead, you will be saved.

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