Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

The program draws an image directly to the Form and not to a picturebox.

 

hDC = User.GetDC(Me.Handle)
EnableOpenGL(hDC)
'draw code follows ... 

 

How can I copy this image drawn to the form to the clipboard?

 

'Clipboard.SetDataObject(Picturebox1.image)    If this was drawn to a picbox
' How do I convert the above command??
'??? 

 

Is this possible? Or do I have to use a picturebox??? Although I know that a picturebox would simplify my problem, there is another issue with regards of using a picturebox, therefore, if possible I would like to avoid using it.

 

However, if it is impossible!! please mention it so I won't spend any more time trying. thanks.

  • *Experts*
Posted
Instead of painting directly on the form, I would do the drawing to some Bitmap variable of the same dimensions of the form's region. After all the drawing on the Bitmap is completed, then paint the Bitmap itself on the form. In addition to reducing flicker, this will also enable you to easily use Clipboard.SetDataObject().

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...