newnewmommon
asked on
print screen ASCII code
in my if i click in ctrl+W the make action to print screen the same thing (print screen button) on keyboard
how can make this ?
how can make this ?
ASKER
yes
simulate a PrtScr keypress when the users press Ctrl-W in your Form
sorry about my language
i want to say ( in my application ...)
simulate a PrtScr keypress when the users press Ctrl-W in your Form
sorry about my language
i want to say ( in my application ...)
What version C# you working with?
ASKER
.Net 2.0
Something like...
private void Form1_Load(object sender, EventArgs e)
{
this.KeyPreview = true;
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.W)
{
SendKeys.Send("{PRTSC}");
}
}
The Ctrl key would still be down when PrtScr is sent so you won't get a complete screen capture...just the form itself. Is this what you wanted?
private void Form1_Load(object sender, EventArgs e)
{
this.KeyPreview = true;
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.W)
{
SendKeys.Send("{PRTSC}");
}
}
The Ctrl key would still be down when PrtScr is sent so you won't get a complete screen capture...just the form itself. Is this what you wanted?
ASKER
ok nice but how if i make try icon
and want my application listen to the keyboard if i'm using another application ?
and want my application listen to the keyboard if i'm using another application ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So you want to simulate a PrtScr keypress when the users press Ctrl-W in your Form?