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

COMCONTROL
plus
plus

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

Display File in Dialog



#DefineSubRoutine FILEVIEWER(MyD_Handle,DMsg,DCID,resvd4,resvd5)
   Switch (DMsg)
       Case 0; msg_init                 ; Dialog Initialization
       DialogProcOptions(MyD_Handle, 11,-1) ; Close selected (IntControl(49....) (1-On, 0-Off).
      ;##################################
      ;BROWSER CONTROL
      ;##################################
       co_MyD_ShellExplorer = 1
       obrowser = DialogObject(MyD_Handle,co_MyD_ShellExplorer,3) ;GET OBJECT HANDLE
       obrowser.navigate("About:Blank",0,'','','')
       obrowser.navigate(file,0,"","","")
      ;##################################
       Break
     Case 11          ; Close
       obrowser = 0
       Exit
       Break
   EndSwitch
Return -2

#EndSubRoutine

Home_Path = DirScript()
DirChange(Home_Path)
file = Home_Path :"sample.doc"
;file = Home_Path : "sample.jpg"
;file = Home_Path : "sample.xls"
IntControl(49,3,0,0,0)


MyDialogFormat=`WWWDLGED,6.1`

MyDialogCaption=`File Viewer`
MyDialogX=002
MyDialogY=038
MyDialogWidth=510
MyDialogHeight=255
MyDialogNumControls=001
MyDialogProcedure=`FILEVIEWER`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`003,003,500,247,COMCONTROL,DEFAULT,"Shell.Explorer",DEFAULT,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog")

Article ID:   W17394
File Created: 2008:04:10:15:09:14
Last Updated: 2008:04:10:15:09:14