Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending a phone call
Message
De
13/07/2001 10:52:24
 
 
À
13/07/2001 10:49:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00530220
Message ID:
00530258
Vues:
18
>>>>I'm new to MSCOMM32. I took some example by doing some searches. I simply what to dial a phone number. I have this code presently:
>>>>
>>>>
>>>>oPhone=CREATEOBJECT('Form')
>>>>oPhone.AddObject('Phone','Olecontrol','MSCOMMLib.MSComm')
>>>>oPhone.Phone.CommPort=1
>>>>oPhone.Phone.PortOpen=.T.
>>>>oPhone.Phone.Output='ATDT123-4567'+CHR(13)
>>>>oPhone.Phone.PortOpen=.F.
>>>>
>>>>
>>>>When I run the program, I see the light changing on my modem but nothing happens. What am I missing?
>>>
>>>Are you giving the control time to send the data ? According to the help setting PortOpen to False clears the transmit buffer. Try waiting until OutBufferSize = 0.
>>>
>>>Another thing to check would be the baud rate setting on the control & modem.
>>
>>Is does not seem to be a waiting issue? I put a messagebox, a wait window and the SLEEP API and it didn't change anything.
>
>Have you tried removing ....PortOpen = .F. - I've just tested with the control placed directly on a form with the form designer & mine dials correctly.
>
>I've placed my code in the Init of the control.

It's always the same thing. The modem blinks at the PortOpen command and that's it. It worked twice out of 40 tries. The modem is fine. I can send faxes from Word and all is well. Even if it does not in VFP, I just switch to Word to do a test and it always work. However, I can't understand why OutBufferCount returns 0 right after the OutPut line. Isn't it suppose to contain to number of bytes waiting to be sent?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform