Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Display Dialog Along with RunWait

 Keywords:  

#DefineFunction MyProc(MyProcDlgHandle,MyProcDlgMessage,MyProcDlgControlID,param4,param5)
   MSG_INIT=0                ; The one-time initilization
   MSG_TIMER=1               ; Timer event
   DPO_DISABLESTATE=1000     ; codes -1=GetSetting 0=EnableDialog 1=DisableDialog
   Switch MyProcDlgMessage

          Case MSG_INIT  
               DialogProcOptions(MyProcDlgHandle,MSG_TIMER,500)   ; wait .5 sec
               Return (-1)

          Case MSG_TIMER
               DialogProcOptions(MyProcDlgHandle,MSG_TIMER,0)   ; turn off timer
               DialogProcOptions(MyProcDlgHandle,DPO_DISABLESTATE,2) ;disable dialog
               RunWait("notepad.exe", "")
               DialogProcOptions(MyProcDlgHandle,DPO_DISABLESTATE,0) ;enable dialog
               TimeDelay(0.5) ; wait just a little here maybe to make notepad look nicer
               Return(1)


   EndSwitch ; ConfigDlgMessage
   Return(-1) ; Do default processing
#EndFunction




MyDialogFormat=`WWWDLGED,6.1`

MyDialogCaption=`TestApp v3.5`
MyDialogX=119
MyDialogY=101
MyDialogWidth=256
MyDialogHeight=067
MyDialogNumControls=002
MyDialogProcedure=`MyProc`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`

MyDialog001=`039,013,170,012,STATICTEXT,DEFAULT,"TestApp v3.5 installation in progress",DEFAULT,1,DEFAULT,"Times New Roman|10752|70|18","0|0|0",DEFAULT`
MyDialog002=`095,039,048,012,STATICTEXT,DEFAULT,"Please wait ...",DEFAULT,2,DEFAULT,"Times New Roman|8192|70|18","0|0|0",DEFAULT`

ButtonPushed=Dialog("MyDialog")

Exit