|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Text file printout in dos mode through VB.Net or DOS command from VB.NetHi,
I am generating a text file through vb.net and I want to give facility to my user to take DOS base (fast) printiout of it , or in other words, I want to run DOS command from my application. i.e. TYPE C:\TEST.TXT >PRN , How can I ? Regards, Hardik Shah Hardik,
Using proces here one which is longer it can be one line as well. \\\ Dim p As New Process Dim pi As New ProcessStartInfo pi.UseShellExecute = False pi.RedirectStandardOutput = True pi.Arguments = "www.google.com" pi.WorkingDirectory = "C:\windows\system32" 'this for nt* computers pi.FileName = "ping" p.StartInfo = pi p.StartInfo = pi p.Start() Dim sr As IO.StreamReader = p.StandardOutput Dim sb As New System.Text.StringBuilder("") Dim input As Integer = sr.Read Do Until input = -1 sb.Append(ChrW(input)) input = sr.Read Loop MessageBox.Show(sb.ToString) /// I hope this helps, Cor "Hardik Shah" <har_sha***@hotmail.com> schrieb: Depending on the printer you may find the article below useful:> I am generating a text file through vb.net and I want to give facility to > my > user to take DOS base (fast) printiout of it , > > or in other words, > > I want to run DOS command from my application. i.e. TYPE C:\TEST.TXT >PRN > , > How can I ? HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;322090> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
question on coding a reset button
System.IO.File.Exists HTML in to readable/value accessible object Help Displaying & Stabilizing PictureBox Contents passing a list as a parameter to a TableAdapter Fill method run a dos command Designing A Process and Report Scheduler/Spooler Application Loading HTML into an HTMLDoc problem calling vbscript Checking strings are alphanumeric |
|||||||||||||||||||||||