Thanks for your reply.
I resolve the trouble, but :-P I got other one; when the form is runing it return the error:
Exception Code Ole IDisplaypatch 0 of MSComm: The device is not open.
I`m using this code in a timer object:
rele gnportnum
local i, lnmodemport
lnmodemport = 0
this.enabled = .f.
with thisform
*~ Close the port if it is open.
.ocxcomm.portopen = .f.
for i = 1 to alen(.acommports,1)
if .acommports(i,1) <> 0
if [OK] $ upper(.acommports(i,2))
*~ Modem found, exit the loop.
lnmodemport = .acommports(i,1)
exit
endif
endif
next i
endwith
*~ Report to user.
wait clear
if lnmodemport <> 0
messagebox([Modem Found On COM ] + allt(str(lnmodemport)),0,[])
else
messagebox([No Modem Found.] ,0,[])
endif
TIA
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only