Link to home
Start Free TrialLog in
Avatar of newnewmommon
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 ?
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

(...attempts a translation...)

So you want to simulate a PrtScr keypress when the users press Ctrl-W in your Form?
Avatar of newnewmommon
newnewmommon

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 ...)
What version C# you working with?
.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?
ok nice but how if i make  try icon
and want my application listen  to the keyboard if i'm using another application ?
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial