PC Review


Reply
Thread Tools Rate Thread

Copy image to clipboard

 
 
Robert Crago
Guest
Posts: n/a
 
      8th Nov 2003
Hi there,

I have a PictureBox that contains an image I created from
a file thus:

pictureBix1.Image = new Bitmap("Image.gif");

Now I want to place that same image on the PPC clipboard
so it can be pasted into other applications like Pocket
Word or Notes.

I can successfully paste text into the clipboard using
DllImports but do not know how to access the underlying
hBitmap (or whatever) to pass to SetClipboardData().

Any suggestions?

Thank you...

Robert
 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      8th Nov 2003
OpenNETCF.Clipboard class offers a complete clipboard interface, but you
won't be able to extract bitmap bits from a picture box other than by
reading it pixel-by-pixel. I suggest writing a small C++ DLL that would use
imgdecmp.dll (http://www.unsupportedsoftware.com/ce/dev/imgdecmp.htm) to
unpack your gif file and return a bitmap handle

"Robert Crago" <(E-Mail Removed)> wrote in message
news:05d201c3a59b$b265b630$(E-Mail Removed)...
> Hi there,
>
> I have a PictureBox that contains an image I created from
> a file thus:
>
> pictureBix1.Image = new Bitmap("Image.gif");
>
> Now I want to place that same image on the PPC clipboard
> so it can be pasted into other applications like Pocket
> Word or Notes.
>
> I can successfully paste text into the clipboard using
> DllImports but do not know how to access the underlying
> hBitmap (or whatever) to pass to SetClipboardData().
>
> Any suggestions?
>
> Thank you...
>
> Robert



 
Reply With Quote
 
Michael Crago
Guest
Posts: n/a
 
      8th Nov 2003
Thanks Alex - I suspected as much, just hoped there was something simple I
had missed.

In fact I'll probably write a dll to not only read the file but also copy it
to the clipboard as well while I'm at it.

Thanks again

--
Robert Crago



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clipboard gets empty by itself, cleared clipboard, copy paste doesn't work, outlook clears clipboard, problems with clipboard - possible solution Jens Hoerburger Microsoft Outlook 0 24th Aug 2006 02:44 PM
Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboard to an image control and obtain its source reference TC Microsoft Dot NET 5 1st Sep 2004 05:49 AM
Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboard to an image control and obtain its source reference TC Microsoft Dot NET Framework 5 1st Sep 2004 05:49 AM
Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboard to an image control and obtain its source reference TC Microsoft C# .NET 2 27th Jul 2004 06:07 PM
Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboard to an image control and obtain its source reference TC Microsoft VB .NET 2 27th Jul 2004 06:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:22 AM.