CLEAR ALL set COLOR TO gr+/r, g/w+ _screen.fontname="Arial" _screen.fontsize=8 clear @10,10 say "this is line 1" @12,10 say "this is line 2" #IF "VISUAL" $ UPPER(VERSION()) ox = CREATEOBJECT('form') ox.left = 10000 ox.BackColor = RGB(255,255,255) ox.ForeColor = RGB(0,0,0) ox.show #ENDIF SET DEVICE TO PRINTER ??? "(s10H " @1,1 SAY "This is a test" SET DEVICE TO SCREEN SET PRINTER TO #IF "VISUAL" $ UPPER(VERSION()) RELEASE ox #ENDIF>Try this, it works for me in a quick and dirty test:
>CLEAR ALL >set COLOR TO gr+/r, g/w+ >clear >@10,10 say "this is line 1" >@12,10 say "this is line 2" >#IF "VISUAL" $ UPPER(VERSION()) > ox = CREATEOBJECT('form') > ox.left = 10000 > ox.BackColor = RGB(255,255,255) > ox.ForeColor = RGB(0,0,0) > ox.show >#ENDIF > SET DEVICE TO PRINTER > @1,1 SAY "This is a test" > SET DEVICE TO SCREEN > SET PRINTER TO >#IF "VISUAL" $ UPPER(VERSION()) > RELEASE ox >#ENDIF >>
>>>WAIT "" time .01 >>>>>>
>>>DOEVENTS FORCE >>>>>>
>>>>set COLOR TO gr+/r, g/w+ >>>>glfontname=_screen.fontname >>>>glfontsize=_screen.fontsize >>>>cOldbackcolor=_screen.backcolor >>>>coldforecolor=_screen.forecolor >>>>coldfillcolor=_screen.fillcolor >>>>clear >>>>@10,10 say "this is line 1" >>>>@12,10 say "this is line 2" >>>>#IF "VISUAL" $ UPPER(VERSION()) >>>> IF TYPE('printscr')="U" >>>> PUBLIC printscr >>>> ENDIF >>>> ACTIVATE SCREEN >>>> SAVE SCREEN TO printscr >>>> _screen.lockscreen=.t. >>>> _Screen.BackColor = RGB(255,255,255) >>>> _Screen.ForeColor = RGB(0,0,0) >>>> _Screen.FillColor = RGB(255,255,255) >>>> _screen.refresh >>>> ACTIVATE SCREEN >>>>#ENDIF >>>> >>>>*redraw screen as it was >>>>#IF 'VISUAL' $ UPPER(VERSION()) >>>> >>>> DECLARE Sleep IN Win32API; >>>> INTEGER nMilliseconds >>>> = Sleep(100) && Wait a 1/10th of a second. >>>> >>>> ACTIVATE SCREEN >>>> >>>> * TCH 7/10/2002 Added >>>> >>>> WITH _screen >>>>* .lockscreen=.T. >>>> .fontname=glFontName >>>> .fontsize=glFontSize >>>> .fontunderline=.f. >>>> .fontbold=.f. >>>> .BackColor = cOldbackcolor >>>> .ForeColor = cOldforecolor >>>> .FillColor = cOldfillcolor >>>> ENDWITH >>>> >>>> _SCREEN.lockscreen=.F. >>>> >>>> WAIT WINDOW "Press anykey..." >>>> >>>> IF TYPE('printscr')!="U" >>>> ACTIVATE SCREEN >>>> RESTORE SCREEN FROM printscr >>>> ENDIF >>>> >>>> CLEAR DLLS "sleep" >>>> >>>> >>>>#ENDIF >>>> >>>>RETURN >>>>