printing a text file from visual basic

printing a text file from visual basic

Post by techman419 » Sat, 10 Jul 2004 14:06:53


I want to make a simple visual basic program that will print a text
file when I run it. This will allow me to just click and icon and the
default printer will print this text file. Can this be done in visual
basic with the print method? Thanks
 
 
 

printing a text file from visual basic

Post by lumino » Sat, 10 Jul 2004 14:55:18

http://www.yqcomputer.com/

GOOGLE GOOOOOOOOOOOOOOOOOOOOOOOOOOOOGLE

 
 
 

printing a text file from visual basic

Post by fajp » Sat, 10 Jul 2004 15:31:35


The poor man's printjob :
Call ShellExecute(0,"print",fileName,vbnullstring,vbnullstring,0)

If that's not your ticket, look up "open", "line input" and
"printer.print"

--

Regards, Frank
 
 
 

printing a text file from visual basic

Post by H-Ma » Sun, 11 Jul 2004 00:21:51

FYI
The link below is for VB.NET code.

--
HK




http://www.yqcomputer.com/


the
visual
 
 
 

printing a text file from visual basic

Post by Michael B. » Sun, 11 Jul 2004 02:57:13

On Fri, 9 Jul 2004 09:21:51 -0600, "H-Man"



Please, /don't/ encourage them to post .NET stuff here.
_______________________
Michael B. Johnson
 
 
 

printing a text file from visual basic

Post by techman419 » Fri, 16 Jul 2004 14:24:14

How do I define the shellexecute function in visual basic.
It doesnt seem to be a defined function in VB 5.0 or 6.0
Thanks
 
 
 

printing a text file from visual basic

Post by fajp » Fri, 16 Jul 2004 14:31:08


Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal _
lpDirectory As String, ByVal nShowCmd As Long) As Long

Or Public of course, if you want to place it in a module, out of the
way.
Btw, there is an API viewer in VB. If you look under the
Add-Ins->Add-In Manager on the menu bar, you can enable it from there.
It'll give you most APIs that were available at the time of VB5's
release. For new ones, see www.allapi.net

--

Regards, Frank
 
 
 

printing a text file from visual basic

Post by techman419 » Fri, 16 Jul 2004 15:12:22

How do I define the shellexecute function in visual basic.
It doesnt seem to be a defined function in VB 5.0 or 6.0
Thanks