Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect shift/enter TLabel 1

Status
Not open for further replies.

DelphiAaron

Programmer
Jul 4, 2002
826
AU
i have made a label that attaches itself to an edit box and changes color with the edit box focus.

the label monitors the editboxes messages and can respond to them.

i want to detect enter and shift/enter to move focus from the editbox.

i can detect enter with something like
if msg.msg = WM_CHAR then if msg.lparam = 13 then ...

but cant work out how to detect shift/enter in the message.

maybe someone has a way ???

thanx



Aaron Taylor
John Mutch Electronics
 
What about using OnKeyDown?

Other than that, you can use the API functions GetKeyState or GetAsyncKeyState (beware the last one, multitasking can fool you).

buho (A).



 
yes, while waiting for a responce on tek-tips i found some code relating to the getkeystate and that worked.

thanx

Aaron Taylor
John Mutch Electronics
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top