Running the following sample you can hear a beep only when the dialog is closed but not when it gets the focus:
EMG
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL cVar := SPACE( 30 )
DEFINE DIALOG oDlg
oDlg:bGotFocus = { || Tone( 440, 1 ) }
@ 1, 1 GET cVar
ACTIVATE DIALOG oDlg;
CENTER
RETURN NILEMG