HELP !! Copying files to Lpt1 in VB 4.0 
Author Message
 HELP !! Copying files to Lpt1 in VB 4.0

How can I copy a file from disc directly to the Lpt1-port in Visual Basic
4.0. (similar to the Dos-command: "COPY /B sourcefile LPT1).

Can any one help me with this problem ????>



Wed, 05 Aug 1998 03:00:00 GMT  
 HELP !! Copying files to Lpt1 in VB 4.0

reservoirs of wisdom:

Quote:
>How can I copy a file from disc directly to the Lpt1-port in Visual Basic
>4.0. (similar to the Dos-command: "COPY /B sourcefile LPT1).

1: Shell out to DOS and ask it to do it
        x% = Shell("copy /b sourcefile LPT1")

2: open the file, read it and print it to LPT1
        Open "sourcefile" for input as #1
        open "LPT1" for output as #2
                do while not eof(1)
                        line input #1, t$
                        print #2, t$
                loop
        close


--
Newbiehood is not a period of time, it's a way of life.

http://www.sn.no/~balchen
ftp://ftp.sn.no/user/balchen/



Thu, 06 Aug 1998 03:00:00 GMT  
 HELP !! Copying files to Lpt1 in VB 4.0

Quote:

>    x% = Shell("copy /b sourcefile LPT1")

x% = Shell("command /c copy /b sourcefile LPT1")
is better

TTFN

 _  _____  _   _

| || (_) || `\| |
| ||  _  || , ` | If they give you lined paper, write the other way!
| || | | || |`\ |
(_)(_) (_)(_) (_) http://www.sn.no/~balchen/igloo/



Fri, 07 Aug 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help Copying File to LPT1:

2. Copy encoded file to Lpt1

3. Copy an File on LPT1 port

4. COPY A FILE TO LPT1

5. Copy directory and files w/ VB 5 and NT 4.0

6. Help, Need to redir LPT1 output to a file

7. NT 4.0 File Security & VB 4.0

8. Need help to read LPT1 pins from a VB app

9. VB 4.0 Professional Help Files

10. VB 4.0 -- Help on searching a Text file

11. Help! Setup Files (VB 4.0)

12. Help File Compiler with VB 4.0 Pro

 

 
Powered by phpBB® Forum Software