Click here to Skip to main content
16,007,760 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: New Kid On The Block Needs Help Pin
robrtb13-Nov-02 5:02
robrtb13-Nov-02 5:02 
GeneralSubs and Functions w/ Optional Args Pin
Eldon Zacek11-Nov-02 7:24
Eldon Zacek11-Nov-02 7:24 
GeneralRe: Subs and Functions w/ Optional Args Pin
Richard Deeming11-Nov-02 23:55
mveRichard Deeming11-Nov-02 23:55 
GeneralMonochrome Bitmap Pin
Jamie Nordmeyer11-Nov-02 6:41
Jamie Nordmeyer11-Nov-02 6:41 
Generalnework folder connection problem using vb.net Pin
pampatipraveen10-Nov-02 14:12
pampatipraveen10-Nov-02 14:12 
GeneralRe: nework folder connection problem using vb.net Pin
Ravi_Shankar11-Nov-02 2:35
Ravi_Shankar11-Nov-02 2:35 
GeneralSocket/TCPclient (Seriazlation) Pin
DeSerializeMe10-Nov-02 12:52
sussDeSerializeMe10-Nov-02 12:52 
GeneralPrinting on dot-matrix printer in .NET Pin
Derec Roofie10-Nov-02 10:53
Derec Roofie10-Nov-02 10:53 
Hi,
In VB6 i use this sample of code to print directly to the printer.
I mean EPSON compatibile dot-matrix printers

Open “LPT1” For Output as #1 Or
Open “\\Server\printer” For Output as #1

Print #1, “something i what to print”
Print #1, “something else ...”
....
Close #1

What I need is to open printer port (LPT1 or \\computer\printer ) like any other file on hard drive, as simple as posible.

I don’t need to print any graphics, just draft (plain) text with a lot of ESCAPE sequences like Pica,Picacondesd, Elite ...

When I use
FileOpen(1, “LPT1”, OpenMode.Output)
PrintLine(1, "This is a test.")
in VB.NET I get an error

Additional information: FileStream was asked to open a device that was not a file. FileStream's constructors that take a String will only work with devices that are really files. If you need support for devices like "com1:" or "lpt1:", then call CreateFile yourself then use the FileStream constructors that take an OS handle as an IntPtr.

Let me know if you have any sugestions for my problem
Thanks in advance

p.s
Sorry for my bad English

Tancev
GeneralAxInterop.AXRfaxVwRctrLLib Pin
Zulfikar Ali8-Nov-02 12:57
Zulfikar Ali8-Nov-02 12:57 
QuestionObject behaviour of simple data types? Pin
Jan Tielens8-Nov-02 0:37
Jan Tielens8-Nov-02 0:37 
AnswerRe: Object behaviour of simple data types? Pin
Richard Deeming8-Nov-02 7:07
mveRichard Deeming8-Nov-02 7:07 
GeneralTreeView redraw lag.. Pin
dazinith7-Nov-02 10:41
dazinith7-Nov-02 10:41 
GeneralRe: TreeView redraw lag.. Pin
mikasa7-Nov-02 11:10
mikasa7-Nov-02 11:10 
GeneralRe: TreeView redraw lag.. Pin
mikasa7-Nov-02 11:14
mikasa7-Nov-02 11:14 
GeneralRe: TreeView redraw lag.. Pin
dazinith11-Nov-02 4:32
dazinith11-Nov-02 4:32 
GeneralRe: TreeView redraw lag.. Pin
mikasa26-Mar-03 3:31
mikasa26-Mar-03 3:31 
GeneralVB Silent Install Pin
Davy Mitchell6-Nov-02 4:43
Davy Mitchell6-Nov-02 4:43 
GeneralRe: VB Silent Install Pin
Nick Parker6-Nov-02 16:49
protectorNick Parker6-Nov-02 16:49 
GeneralRe: VB Silent Install Pin
Davy Mitchell6-Nov-02 22:09
Davy Mitchell6-Nov-02 22:09 
GeneralLaunching External Exe File Pin
Desmond5-Nov-02 22:43
Desmond5-Nov-02 22:43 
GeneralRe: Launching External Exe File Pin
Nick Parker6-Nov-02 2:12
protectorNick Parker6-Nov-02 2:12 
GeneralRe: Launching External Exe File Pin
Vasudevan Deepak Kumar6-Nov-02 4:02
Vasudevan Deepak Kumar6-Nov-02 4:02 
QuestionMultiple DataTables in DataGrid? Pin
ILoveInternet5-Nov-02 22:10
ILoveInternet5-Nov-02 22:10 
AnswerRe: Multiple DataTables in DataGrid? Pin
Tuukka Turto19-Nov-02 19:42
Tuukka Turto19-Nov-02 19:42 
GeneralDrawing Issue Pin
Jamie Nordmeyer5-Nov-02 9:46
Jamie Nordmeyer5-Nov-02 9:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.