Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send text file to a com port 2

Status
Not open for further replies.

safraser

Programmer
Apr 12, 2001
76
NZ
We are looking for an easyway to send a textfile to a comm port using native vfp6 code.
Will I be able to do this with low level file functions
 
Hi
Are you meaning to email a text file or for what purpose..
If it is email.. then follow the link...
How can I send an Email using OUTLOOK from VFP?
faq184-766

If it com port.. follow thread..
thread184-65425

Hope this helps ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
The output is going to a com port printer. We found out the NT drivers for it don't work but by sending the file to the port rather than the drive we can get around the problem
 
You would need to use the MSComm32 control. To add the control to your form, do the following:

1. Select Options from the Tools menu.
2. Select the Controls tab.
3. Make sure ActiveX controls is selected.
4. Find "Microsoft Communication Control" and check the box.
5. Click "Ok" or "Set as Default" (your choice).

Open the form you wish to put the control on and make sure the Form Controls toolbar is visible. Click the button with the books on it and select "ActiveX Controls". Click the button that looks like a telephone, and add it to your form.

Set your properties on the control to your needs. The "Settings" property contains your bitrate, parity, data bits, and stop bits as a string. Set the "PortOpen" property to .T. to enable communications, then put what you want to send into the "Output" property.

You can always press F1 on the control to bring up the MSComm32 help file.

Hope that helps!
 
Thanks Guys.
In the end we did use the MSComm thig and everythin is runing fine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top