Root > Reference > All Functions > GetControlText

Function GetControlText

Previous pageReturn to chapter overviewNext page   

Gets text of active control.

 

Unit

ESysInfo

 

Syntax

 

Code (Delphi)

function GetControlText(

const AWnd: HWND = 0

): String;

 

Return value

Text of active (focused) single line text control. Empty string if there is no focused single line control.

 

Sample output: 'Some text'

 

Remarks

This function is combination of WM_GETTEXT message from GetFocus

 

Note

This function uses a timeout of 100 ms. If active window is hung and not responding - function will return empty string after timeout. Therefore it's safe to call this function, no deadlock is possible.

 

Note

This function will not return clear text from password controls. Passwords will be masked by password characters (typically - *).

 

See also




Send feedback... Build date: 2024-09-30
Last edited: 2024-09-30
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_function_esysinfo_getcontroltext.php