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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement