Kbase 17880: How to Bring a Dialog Enabled Widgets to the Foreground
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
How to Bring a Dialog w
o Enabled Widgets to the Foreground
If you are running into the problem where you are displaying a dialog
box that contains status information only (i.e. no enabled widgets
are being displayed on the dialog box) and the dialog box will not
not have the visual focus, the following shows you how to get around
the problem.
NOTE: This sample code assumes you created the dialog box in the UIB
and are running Progress Version 8.2A or higher on Windows.
1) Add the following external procedure definition (DLL) to the
Definitions section of the dialog box in the UIB.
PROCEDURE SetForegroundWindow EXTERNAL "USER32.DLL":
DEFINE INPUT PARAMETER intHwnd AS LONG.
END PROCEDURE.
2) In the Main Block section of the dialog box in the UIB, add the
following code after the "RUN enable_UI" statement.
RUN SetForegroundWindow (FRAME {&FRAME-NAME}:HWND).
Bingo! You are done. Now just run your code.
Progress Software Technical Support Note # 17880