I am using this code on my chat window to paste smiles image into RichTextBox, but I am facing problem when message is being come form other buddy on that time i am checking my symbol for which smile image should be paste, suppose other buddy send 500 smile symbol, my program find out those smile symbol and choosing image to paste on RichTextBox, but if same time end user manually copy the other text or image and paste it word etc. that time my program is gives error
Run time error '521'
can't open clipboard
I am using this mechanism to copy smile image into RichTextBox :-
' Copy the picture into the clipboard.
' Paste the picture into the RichTextBox.
SendMessage RichTextBox1.hwnd, WM_PASTE, 0, 0
if any one have solution pls send immediately replay