How do I simulate an Alt-PrintScreen

  • Thread starter Thread starter John Galt
  • Start date Start date
J

John Galt

I have a request to add a button that will automatically create an image
copy of the current screen. For whatever reason, the user does not want to
do the Alt-PrintScreen. I would like to associate this with a button to
accomplish the same thing.

Is this possible?
 
Hi John
I don't have a direct answer, but I downloaded some code where the person
was sending key commands using windows API's and I am sure you will be able
to use that in your case.

This is a part of the code you may need, however; I encourage you to
download the authors full project to see how he is using this :-)

[DllImport("user32.Dll")]
public static extern int keybd_event(byte ch,byte scan,int flag,int info);

keybd_event((byte)Keys.PrintScreen,0,0,0);

Author's code
http://www.codeproject.com/cs/media/tambiSR.asp


Henk Verhoeven
http://www.4iam.net
 
Back
Top