Hi Mark,
I tried your method but still having the same problem, see the hour glass and program not responsing when you tell task manager in Win2k.
Below is part of my testing code, hope u can see my mistake, thank
#DEFINE PRTNAME [TSP442D]
IF THISFORM.olestar.Open(PRTNAME) = 0
IF THISFORM.olestar.ClaimDevice(0) = 0
THISFORM.olestar.DeviceEnabled = .T.
THISFORM.olestar.AsyncMode = .F.
Messagebox("Printer enabled")
IF THISFORM.oleStar.CapRecNearEndSensor = .F.
Messagebox("Printer don't have near end sensor")
ELSE
Messagebox("Printer have near end sensor")
IF THISFORM.oleStar.RecNearEnd
Messagebox("Printer receipt paper is low")
ENDIF
ENDIF
IF THISFORM.olestar.CapRecEmptySensor
IF THISFORM.olestar.RecEmpty
Messagebox("Paper is empty")
ELSE
Messagebox("Paper is okay")
ENDIF
ELSE
Messagebox("Printer don't have empty sensor")
ENDIF
ENDIF
IF THISFORM.oleStar.Claimed
THISFORM.oleStar.ReleaseDevice()
Messagebox("going to close the device")
THISFORM.olestar.Close()
Messagebox("All done")
ENDIF
ENDIF
>After I Open and Claim the printer, I set the DeviceEnabled property to TRUE and AsyncMode to FALSE. In the Destroy method of my form, all I do is:
>IF THIS.oleOpos.Claimed
> THIS.oleOpos.Close()
>ENDIF
>I do not set the DeviceEnabled property to false. That is all I do.
>
>>Hi,
>>
>>I had tried your method, but it still give me problem like showing hour glass and halt my system. I am using the OPOS printer driver. Do your know what is wrong ?
Best Regards
Virusim