Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need DOS printing from a VB 6.0 Application developed on Win 98. In VB, I am using Data Environment to create report and I want to have DOS printing facility in my Appplication to have afaster printing.
PLease help me...

Save the data to a file with print command opening a file en disk,
then using the shell you can use the type from dos.
You can do it on a network, by writing a batch file for printing in dos.
---------------------------
@echo off
Type c:\printdoc.txt > prn
exitsave above file as c:\printbat.bat in VB you execute it as Shell("c:\printbat.bat")
I hope this helps,ASHLEY4

i want to print crystal report in dos mod through
vb6.0 .
another prob is that i have to print two different size character in same line in vb 6.0 code if u know pls mail me

Just follow the code. You can print it in dos fast printing....
With CrystalReport1
.ReportFileName = "InboundList.rpt"
.PrintFileName = "TextFile.txt"
.Destination = crptToFile
.PrintFileType = crptPagedText
.Action = 2
End With
If Dir$("TextFile.Txt") = "" Then
MsgBox WarnNoOutput$
Else
Shell (Environ("comspec") & " /c type " & App.Path & "\textfile.txt >prn ")
End IfAnd for Double size printing in crystal report textobject type alt+14. It will print in double size......
More help contact me...

hi friends
i m working in a software company. now i have to do a lot of reports in datareport,crysital report and even in dos printing from vb. If any one knows how to print in dos mod from vb. i want to enlarg the font,some times compress the font, and one clients need to change the background of data report please help me.
thanks in advance

Abdul Rahman,
code u have given as a solution for fast printing if used in vb code is giving me
compile errors in
'With CrystalReport1'
do reply back.
thanks

Hi friends,
To enlarge or compress the font size in Crystal reports:
1. Insert a Text Object.
2. Edit the Text Object with the Escape Key sequence. eg: ALT+14 then type "Customer Name:" inside the text box. If you type ALT+14 the text box will react as if like an enter key is pressed inside the Textbox and type your Text. This methord can be used for Textbox and for any fields of Crystal reports by inserting a TextBox and drag&Drop your Database or Formula Fields into the Textbox. Place the Cursor in the beginning of Textbox and insert ALT+14 to print in BOLD (Double Size).
3. All the above should be printed in DOS SHELL only bcos DOS SHELL Escape sequence will work only in DOS Mode Printing. (See my previous posting for DOS printing Codes)4. Double Size: ALT+14
Compress Size : ALT+18Refer your Printer Manual for more font settings.
Hope you enjoy my snippets.

Hi Mr. Abdoul Rahman:
I want to ask you a question about VB issue ( if you don't mind)
I want to run an executable ( a "C" source file compiled & an executable obtained from it) in VB project.
I was able to do this through a Shell Command & here is the sample :Private Sub Command2_Click()
Dim RetVal
RetVal = Shell("C:\Cvl\test0.exe", 1) ' Run test.
End SubI was also able to do this through a different Shell Command & here is the other sample :
Private Sub Command7_Click()
Dim MyAppID3, ReturnValue
MyAppID3 = Shell("C:\Cvl\test0.exe", 1) ' Run test.
WaitSeconds (5)
SendKeys "{DOWN 3}", True
WaitSeconds (5)
End SubWell my Problem that in run in a MSDOS Window . And I wanted it to run on a Windows Format Window.
Can you Help.
Thank you very Much.
Abdel Kad

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |