Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Communication Port & Rebuild Library FLL from PLB
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00056766
Message ID:
00057731
Vues:
33
>>>Rocky Boy...
>>
>>I allready pu olecontrol1 into my form (mscomm32.ocx), then I also pu command button into
>>it also. In click event command button :
>>thisform.olecontrol1.portopen=.t.
>>thisform.olecontrol1.output="Test"
>>
>>There is an error while I click the button :
>>- OLE ERROR CODE 0x800ALF45;UNKNOW OLE STATUSCODE
>> in line thisform.olecontrol1.portopen=.t.
>>Then I Ignored this things :
>>- OLE IDISPATCH EXCEPTION CODE O FROM MSCOMM:OPERATION VALID ONLY WHEN THE PORT IS OPEN
>>
>>Any idea?
>>Thank's
>>Andri Thaslim
>
>what comm port do you try to open ?
>are you sure that's correct or if it really a comm port not a modem or something like that ?

I try to write into com2 (there is one Posiflex Pole Display for Cash Register whict connect to com2)
and I'm using VFP 5.0 for my POS Application.

The command in Dos is Like this :
Procedure Disp_str
parameters line1, line2
line1= line1 + Space(20)
line1= Left(line1, 20)
line2= line2 + Space(20)
line2= Left(line2, 20)
comm_name= "COM2"
xopen= fopen(comm_name, 1)
if (ferror() != 0)
return .F.
endif
dispchr= line1 + line2
if (fwrite(xopen, dispchr, Len(dispchr)) <= 40)
for c= 1 to Len(Trim(dispchr))
=fwrite(xopen, Chr(9), 1)
next
=fclose(xopen)
return .F.
endif
=fclose(xopen)
return .T.


What should I do to Convert that program into VFP5.0 ?

Thank's
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform