Massimo Try
Function Main() Local hThread := hb_threadStart( {|| MyCrystalViewer() } ) do while .t. if inkey() == 27 exit endif enddo hb_threadJoin( hThread ) Return nil Function MyCrystalViewer() LOCAL oCrystal := CREATEOBJECT( "CrystalRuntime.Application" ) LOCAL oReport := oCrystal:OpenReport( "PROVA.RPT" ) LOCAL oDlg, oActvX oDlg := WvgDialog():New():Create( , , { 20,20 }, { 600,400 }, , .t. ) oActvX:= WvgActiveXControl():New( oDlg:drawingArea ) oActvX:CLSID := "CRViewer9.CRViewer" oActvX:create( , , {0,0}, oDlg:currentSize(), .t. ) oActvX:ReportSource := oReport oActvX:Do( "ViewReport" ) // I do not know how it must behave oActvX:resize := {|| oActvX:setPosAndSize( {0,0}, oDlg:currentSize(), .t. ) } do while .t. if inkey() == 27 exit endif enddo oDlg:destroy() Return nil It is direct on keyboard, please correct any mistakes in typing. Regards Pritpal Bedi Massimo Belgrano-3 wrote: > > any chance using gtwvg? > >> #include "Fivewin.ch" >> >> >> FUNCTION MAIN() >> >> LOCAL oCrystal := CREATEOBJECT( "CrystalRuntime.Application" ) >> LOCAL oReport := oCrystal:OpenReport( "PROVA.RPT" ) >> >> LOCAL oWnd, oCRViewer >> >> DEFINE WINDOW oWnd >> >> oCRViewer = TActiveX():New( oWnd, "CRViewer9.CRViewer" ) >> >> oCRViewer:SetProp( "ReportSource", oReport ) >> oCRViewer:Do( "ViewReport" ) >> >> oWnd:oClient = oCRViewer >> >> ACTIVATE WINDOW oWnd; >> MAXIMIZED >> >> RETURN NIL > -- View this message in context: http://www.nabble.com/hbwin32.lib-tp13874002p20817801.html Sent from the Harbour - Dev mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour