RSS Forums RSS
Please support our Pascal and Delphi advertiser: Programming Forums

Emulating a keyboard key press

Join Date: Aug 2005
Posts: 6
Reputation: neverwinter is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
neverwinter neverwinter is offline Offline
Newbie Poster

Re: Emulating a keyboard key press

  #6  
Sep 15th, 2005
Try checking the Application object to see if it has an available property/method to return the control that has focus...

You can also revise the sample code (above) to check for TCustomEdit (instead of TWinControl), i.e.

...
if (Controls[index] is TCustomEdit) and TCustomEdit(Controls[index]).Focused then
result := Controls[index];
...
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:20 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC