newtofoxpro
Programmer
lcPDF = getfile('PDF')
FrmHeight=600
FrmWidth =900
PUBLIC oForm
oForm = CREATEOBJECT('MyViewer',m.lcPDF)
oForm.Height=FrmHeight
oForm.Width=FrmWidth
oForm.Keypreview = .T.
oForm.Show()
Define Class myViewer As Form
Height=400
Width=600
Add Object htmlViewer As OleControl With ;
Height=FrmHeight-50,;
Width=FrmWidth,;
Anchor=15,OleClass='Shell.Explorer'
ADD OBJECT command1 AS commandbutton WITH ;
Top = FrmHeight-35, Left = FrmWidth-100, Height = 27, Width = 84, ;
Caption = "\<Close", Name = "Command1", cancel = .T.
ADD OBJECT command2 AS commandbutton WITH ;
Top = FrmHeight-35, Left = FrmWidth-200, Height = 27, Width = 84, ;
Caption = "\<E-Mail", Name = "Command2"
Procedure Init(tcFileName)
This.htmlViewer.Navigate2('file://'+m.tcFileName)
Endproc
Procedure htmlViewer.Refresh()
Nodefault
ENDPROC
PROCEDURE command1.Click
thisform.release()
ENDPROC
PROCEDURE command2.Click
WAIT WINDOW 'Mail in Process...'
ENDPROC
Enddefine
FrmHeight=600
FrmWidth =900
PUBLIC oForm
oForm = CREATEOBJECT('MyViewer',m.lcPDF)
oForm.Height=FrmHeight
oForm.Width=FrmWidth
oForm.Keypreview = .T.
oForm.Show()
Define Class myViewer As Form
Height=400
Width=600
Add Object htmlViewer As OleControl With ;
Height=FrmHeight-50,;
Width=FrmWidth,;
Anchor=15,OleClass='Shell.Explorer'
ADD OBJECT command1 AS commandbutton WITH ;
Top = FrmHeight-35, Left = FrmWidth-100, Height = 27, Width = 84, ;
Caption = "\<Close", Name = "Command1", cancel = .T.
ADD OBJECT command2 AS commandbutton WITH ;
Top = FrmHeight-35, Left = FrmWidth-200, Height = 27, Width = 84, ;
Caption = "\<E-Mail", Name = "Command2"
Procedure Init(tcFileName)
This.htmlViewer.Navigate2('file://'+m.tcFileName)
Endproc
Procedure htmlViewer.Refresh()
Nodefault
ENDPROC
PROCEDURE command1.Click
thisform.release()
ENDPROC
PROCEDURE command2.Click
WAIT WINDOW 'Mail in Process...'
ENDPROC
Enddefine