Hello
Can I put a GIF picture in Rich TextBox? how?
Thanks
Printable View
Hello
Can I put a GIF picture in Rich TextBox? how?
Thanks
Try the following:
VB Code:
Option Explicit Private Declare Function SendMessageByLong& Lib "user32" _ Alias "SendMessageA" _ (ByVal hwnd&, ByVal wMsg&, ByVal wParam&, ByVal lParam&) Private Const WM_PASTE& = &H302 Private Sub Command1_Click() Clipboard.Clear Clipboard.SetData LoadPicture("c:\myimage.gif"), vbCFBitmap Call SendMessageByLong(RichTextBox1.hwnd, WM_PASTE, 0, 0) Clipboard.Clear End Sub
But the GIF Picture doesn't move.
What did you expect? RTB is not a player - it's a text editor that allows to display static images (and thanks for that...).
OK how does it work in TextBox of MSN Messenger & Yahoo?
Is it Rich TextBox or not?
How would I know? I didn't develop any of those...
However, thank you very much RhinoBull for replying and helping.
np, :wave:
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.
Thanks very much
You may use an image control.
You may read each frame of a GIF file then show it in the Image Control.