Click here to Skip to main content
15,897,891 members

Comments by Akbar Ali Hussain (Top 45 by date)

Akbar Ali Hussain 22-Apr-14 15:16pm View    
After creating the file, you can send that file to Printer using Shell command. Refer code below...

Dim file_name As String = Application.StartupPath() & "/text.dat"
Dim command as String = "type " + file_name + " > prn"
Dim proc As Process = New System.Diagnostics.Process()
proc.StartInfo = New System.Diagnostics.ProcessStartInfo("cmd", "/c " & command)
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.RedirectStandardError = True
proc.StartInfo.UseShellExecute = False
proc.StartInfo.CreateNoWindow = True
proc.EnableRaisingEvents = False
proc.Start()
proc.WaitForExit()
Akbar Ali Hussain 22-Apr-14 15:16pm View    
Deleted
After creating the file, you can send that file to Printer using Shell command. Refer code below...
<coide>
Dim file_name As String = Application.StartupPath() & "/text.dat"
Dim command as String = "type " + file_name + " > prn"
Dim proc As Process = New System.Diagnostics.Process()
proc.StartInfo = New System.Diagnostics.ProcessStartInfo("cmd", "/c " & command)
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.RedirectStandardError = True
proc.StartInfo.UseShellExecute = False
proc.StartInfo.CreateNoWindow = True
proc.EnableRaisingEvents = False
proc.Start()
proc.WaitForExit()
Akbar Ali Hussain 22-Apr-14 15:12pm View    
Deleted
This should work..

Dim file_name As String = Application.StartupPath() & "/text.dat"
Dim command as String = "type " + file_name + " > prn"
Dim proc As Process = New System.Diagnostics.Process()
proc.StartInfo = New System.Diagnostics.ProcessStartInfo("cmd", "/c " & command)
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.RedirectStandardError = True
proc.StartInfo.UseShellExecute = False
proc.StartInfo.CreateNoWindow = True
proc.EnableRaisingEvents = False
proc.Start()
proc.WaitForExit()
Akbar Ali Hussain 15-Apr-14 20:55pm View    
What functionality you need help for? Getting lat/long of user selected location? or storing lat/long to database? or something else?
Akbar Ali Hussain 31-Mar-14 17:33pm View    
It is showing all cells for me