How to make the Close button lying at the right-top corner of form get the focus?

  • Thread starter Thread starter John
  • Start date Start date
I want to use ESC to close the form, but it's nullity.i think that should be
have a function to make the Close button to get the focus, liking
SendMessage(...) function!
 
just capture the escape on the form and close it. You cannot give focus to
the window close button (the X in the upper right).


--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
another question, when a button gets the focus, why the choice action is
click the SPACE, not the ENTER?
 
according to windows u/i guidelines (which have been published for over a
decade), space selects the current button, enter selects the default button
on the form.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Back
Top