Results 1 to 6 of 6

Thread: Hôw tõ Åðd @ PíçtùrE Tô A rÌCHtEXt-B0x

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146

    Talking

    how to add a picture(.gif) to a richtextbox???
    add the picture to the text...

    wenn i add a picture in ms word and then drag/drop it to the richtextbox in my app (while it's running...) then it worx..... but how can i do this scripted????

    thx in advance

    m€

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Exclamation

    Ich denke daß Ihre "Font Editor" ist kaputt!
    Mark
    -------------------

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    chicago (hope)
    Posts
    146
    die tastatur hat leider ein paar fehler.....



    and what's up with the picturein the rtfbox???

  4. #4
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    Have you tried looking at the RTF Code in the Box, it's the textRTF property, look at this when you paste your picture, then try copy what it does

  5. #5
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Wink

    What you can do is to use an invisible PictureBox. You will have to load picture file into that PictureBox and then paste it into a RichTextBox:
    Code:
    Option Explicit
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Private Const WM_PASTE = &H302
    
    Private Sub Command1_Click()
        With Picture1
            .AutoSize = True
            .Visible = False
            .Picture = LoadPicture("C:\Giggling.bmp")
        End With
        
        Clipboard.Clear
        Clipboard.SetData Picture1.Image, vbCFBitmap
        Call SendMessage(RichTextBox1.hwnd, WM_PASTE, 0, 0)
    End Sub

  6. #6
    Guest
    Das wetter ist sehr schon!

    Ahh, you can't beat proper English edyoocayshun.

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