by xVar » Mon Feb 09, 2009 8:00 am
This way is good if If I use 2 buttons, that use one function.
But if I use One button for show Dialog , and click on Main window or Button that start dialog - dialog go to backend, and I can't show it.
Dialog not like "Dialog", it is normal window:( . But, if I run "tutor06" application dialog is run normally ... In "tutor10" dialog is not run in modal mode.
What I make worst ?
FindWindow( ) is not help me.
It is a code :
// Dialog Test
#include "fwce.ch"
#include "dll.ch"
function Main()
Local oWnd
DEFINE FONT oFontS NAME 'Arial' SIZE 0, -10
DEFINE WINDOW oWnd TITLE "RFID_OMME"
@ 5, 0 BUTTON "Test Button" ;
SIZE 204, 26 ;
FONT oFontS;
ACTION ShowDialog()
ACTIVATE WINDOW oWnd
oFontS:End()
oDld:End()
oWnd:End()
return nil
//-------------------------------------------------------------------------//
STATIC FUNCTION ShowDialog()
//-------------------------------------------------------------------------//
local oDlg
LOCAL cText := 'Try click on MainWindow, please'
if FindWindow( 0, "Test" ) != 0
MsgInfo( "Application already working" )
return nil
endif
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 200
@ 1, 1 SAY cText SIZE 70, 20
ACTIVATE DIALOG oDlg CENTERED
oDlg:End()
RETURN NIL