WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Temporarily Hide WIL Dialog

 Keywords: Hide Show WinHide WinShow Invisible WIL Dialog Disable Enable  

#DefineSubRoutine MyDialogCallbackProc(MyDialog_Handle,MyDialog_Message,MyDialog_Name,MyDialog_EventInfo,MyDialog_ChangeInfo)
   MSG_INIT=0
   MSG_BUTTONPUSHED=2            ; Pushbutton or Picturebutton
   ;Return code constants
   RET_DO_CANCEL=0           ; Cancels dialog
   RET_DO_DEFAULT= -1        ; Continue with default processing for control
   RET_DO_NOT_EXIT= -2       ; Do not exit the dialog
   ON_EQUAL = @TRUE                                         ; Initialize variable ON_EQUAL
   Switch MyDialog_Message                                  ; Switch based on Dialog Message type
      Case MSG_INIT                                         ; Standard Initialization message
;         DialogProcOptions(MyDialog_Handle,MSG_TIMER,1000)
         DialogProcOptions(MyDialog_Handle,MSG_BUTTONPUSHED,@TRUE)
         Return(RET_DO_DEFAULT)

     Case MSG_BUTTONPUSHED
        If MyDialog_Name == "PushButton_Hide"              ; Hide
               DialogProcOptions( MyDialog_Handle, 1000, 1 )  ; Disable Dialog
               WinHide( MyDialogCaption)                      ; Hides the dialog
               While @TRUE                                    ; Waits for user to press CTRL key
                    If IsKeyDown( @CTRL ) Then Break          ; Breaks from loop
               EndWhile
               DialogProcOptions( MyDialog_Handle, 1000, 0 )  ; Enable Dialog
               WinShow( MyDialogCaption)                      ; Show the Dialog
              Return(RET_DO_NOT_EXIT)

        ElseIf MyDialog_Name == "PushButton_Cancel"        ; Cancel
              Return(RET_DO_DEFAULT)

        EndIf                                              ; MyDialog_Name
        Return(RET_DO_DEFAULT)

   EndSwitch                                                ; MyDialog_Message
   Return(RET_DO_DEFAULT)
#EndSubRoutine                                                ; End of Dialog Callback MyDialogCallbackProc


MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=`WIL Dialog 1`
MyDialogX=002
MyDialogY=059
MyDialogWidth=766
MyDialogHeight=353
MyDialogNumControls=003
MyDialogProcedure=`MyDialogCallbackProc`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`259,143,036,012,PUSHBUTTON,"PushButton_Hide",DEFAULT,"Hide",1,10,32,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`335,145,036,012,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Cancel",0,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog003=`065,093,522,012,STATICTEXT,"StaticText_1",DEFAULT,"HOLD DOWN THE CTRL KEY TO UNHIDE!!!!",DEFAULT,30,512,"Microsoft Sans Serif|9728|70|34",DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog")

Article ID:   W17766
Filename:   Temporarily Hide WIL Dialog.txt
File Created: 2013:05:23:13:06:14
Last Updated: 2013:05:23:13:06:14