|
-
Apr 2nd, 2003, 06:30 PM
#1
Thread Starter
Frenzied Member
Printing
Can someone give me an example of how to print a string to the printer? I seem to be having problems doing this.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Apr 2nd, 2003, 06:42 PM
#2
Frenzied Member
I've never done it, but I think printing to a printer is the same as using the streams in C++ (Files, Console io, etc) but that you have to map it to LPT1 or something.. I try to look something up for ya!
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Apr 2nd, 2003, 06:46 PM
#3
Frenzied Member
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Apr 2nd, 2003, 06:56 PM
#4
Thread Starter
Frenzied Member
Great thanks I will try the stream. I was trying to use OpenPrinter, WritePrinter, etc and was failing.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Apr 2nd, 2003, 07:02 PM
#5
Thread Starter
Frenzied Member
Ok neither worked. I have XP an the printer is local but the stream isn't working. Nothing happens and it locks on the close so it must not be getting opened
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Apr 5th, 2003, 01:31 AM
#6
Junior Member
have you tried this
--------------
include <stdio.h>
void main()
{
FILE *printer;
printer = fopen("LPT1,"w");
fprintf(printer,"Hello World");
}
----------------
or can have it go to disk and then print it out,
remember to have disk in a:
----------------
include <stdio.h>
void main()
{
FILE *todisk;
todisk = fopen("a:\myfile.txt,"w");
fprintf(todisk,"Hello World");
}
-------------
All Help Very Much Appreciated 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|