Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I want to create a texture from the screen sortof like clicking print screen copies an image to the clip board only i want to make a texture of it to play with,.. any advice?
Posted
hrm... you could both use the BitBlt API function OR simply send the PrintScreen key through code and grab the bitmap from the clipboard :)
Menge
Posted

to send the printscreen key

SendKeys.SendWait("+{PRTSC}");

 

to retrieve a Bitmap from the clipboard, you can do this

Bitmap screen=(Bitmap)Clipboard.GetDataObject().GetData(typeof(Bitmap));

 

now all you need to do is put it together with the right error checking :)

Menge
Posted

k

 

Thank you very much :D from there i can easily make a texture from the bitmap and then add some hopefully cool effects. Thanks everyone for another job well done.

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...