Focus$

Windows management function.

The Focus$ function returns the name of the window which has the input focus.

Syntax

window_name$=Focus$()

Parameters

None.

Return value

A string which gives the window name of the window which has the input focus.

See also

Top$

Example

 

Shell("sysedit")

 

'wait until sysedit is loaded

pause 3

 

'display the name of the window which has the focus

windows_name$=Focus$()

Msgbox("The command Focus$ returns : "+windows_name$)

pause 1

 

'window commutation

usewindow(top$())

sendkeys("<Ctrl <tab>>")

pause 1

 

'display the name of the new window which has the focus

windows_name$=Focus$()

Msgbox("The command Focus$ returns : "+windows_name$)

pause 1

 

'close sysedit

CloseWindow(top$())