The following code is working nicely for what I need in VFP 6. However, I have the following questions.
1) What is the correct property to disable the minimum button?
2) The Form close button (X) is enabled and works, but, the viewer's close button on the left is not enabled? Apparently the properties I'm using are not the correct one???
3) If I remove the MessageBox(), I get a run-time error stating OLE may be corrupt?
Thanks again in advance for all of the help and advice.
==================================================
crApp =createobject("crystalruntime.application")
crReport =createobject("crystalruntime.report")
crReport =crApp.openreport('t:\gl_008.rpt')
crReport.EnableParameterPrompting = .F.
MyCrystalViewer = CREATEOBJECT('Form')MyCrystalViewer.Closable = .t.
MyCrystalViewer.Width = (_Screen.Width-1)
MyCrystalViewer.Height = (_Screen.Height-1)
WITH MyCrystalViewer
.addobject('crviewer1','olecontrol','crviewer.crviewer')
WITH .crViewer1
.height = MyCrystalViewer.height
.width = MyCrystalViewer.width
.ShowGroupTree = .F.
.ShowToolBar = .T.
.EnableExportButton = .T.
.EnableCloseButton = .T.
.HasGroupTree = .F.
.HasNavigationControls = .T.
.HasStopButton = .T.
.HasPrintButton = .T.
.HasZoomControl = .T.
.HasCloseButton = .T.
.HasProgressControl = .T.
.HasSearchControl = .T.
.HasRefreshButton = .T.
.CanDrillDown = .F.
.EnableGroupTree = .F.
.Visible = .T.
.reportsource = crReport
.ViewReport
=MESSAGEBOX("Processing completed.")
ENDWITH
ENDWITH
MyCrystalViewer.SHOW
READ EVENTS
Best Regards,
Lee Roy J. Pitre, Jr, AAS, BA, MS
Pitre Computer Consultant & Associates
http://pitres.us