Solved

Run time error '521' can't open clipboard

Posted on 2002-04-12
3
883 Views
Last Modified: 2008-01-09

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.
Clipboard.Clear
Clipboard.SetData Picture1.Picture

' Paste the picture into the RichTextBox.
SendMessage RichTextBox1.hwnd, WM_PASTE, 0, 0

if any one have solution pls send immediately replay

Rajender

0
Comment
Question by:rajunegi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 200 total points
ID: 6938447
did you try using If Clipboard.GetFormat(vbCFBitmap) before paste?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7654009
Hi rajunegi,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept Richie_Simonetti's comment(s) as an answer.

rajunegi, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7754995
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question