Results 1 to 11 of 11

Thread: [RESOLVED] GIF in Rich TextBox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Location
    United States
    Posts
    157

    Resolved [RESOLVED] GIF in Rich TextBox

    Hello
    Can I put a GIF picture in Rich TextBox? how?

    Thanks

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: GIF in Rich TextBox

    Try the following:
    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function SendMessageByLong& Lib "user32" _
    4.     Alias "SendMessageA" _
    5.     (ByVal hwnd&, ByVal wMsg&, ByVal wParam&, ByVal lParam&)
    6.  
    7. Private Const WM_PASTE& = &H302
    8.  
    9. Private Sub Command1_Click()
    10.  
    11.     Clipboard.Clear
    12.     Clipboard.SetData LoadPicture("c:\myimage.gif"), vbCFBitmap
    13.    
    14.     Call SendMessageByLong(RichTextBox1.hwnd, WM_PASTE, 0, 0)
    15.    
    16.     Clipboard.Clear
    17.  
    18. End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Location
    United States
    Posts
    157

    Re: GIF in Rich TextBox

    But the GIF Picture doesn't move.

  4. #4

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Location
    United States
    Posts
    157

    Re: GIF in Rich TextBox

    OK how does it work in TextBox of MSN Messenger & Yahoo?
    Is it Rich TextBox or not?

  6. #6

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Location
    United States
    Posts
    157

    Re: GIF in Rich TextBox

    However, thank you very much RhinoBull for replying and helping.

  8. #8

  9. #9
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: GIF in Rich TextBox

    I don't think it is a RichTextBox in their program. Probably a web browser or something that can display animated GIFs.

    You would have to use an API spy program or something to get the Classname of the chat window to see what they're using.

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Location
    United States
    Posts
    157

    Re: [RESOLVED] GIF in Rich TextBox

    Thanks very much

  11. #11
    Fanatic Member eSPiYa's Avatar
    Join Date
    Jun 2006
    Location
    in our house
    Posts
    751

    Re: [RESOLVED] GIF in Rich TextBox

    You may use an image control.
    You may read each frame of a GIF file then show it in the Image Control.

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