View Single Post
  #1 (permalink)  
Old February 11th, 2012, 02:04 AM
suskumarsus suskumarsus is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default HOW TO PRINT TEXT FILE IN VISUAL BASIC 6

how print a text file and landscape/portrait mode, i am using following code but lot blank paper ejected. please give me simple and very use full method, please help me

Private Sub cmdPrint_Click()
On Error Resume Next
' If ActiveForm Is Nothing Then Exit Sub
With MDIForm1.dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
.FontSize = 8
.Orientation = cdlLandscape
Else
.Flags = .Flags + cdlPDSelection
.FontSize = 8
.Orientation = cdlLandscape
End If
.ShowPrinter
If err <> MSComDlg.cdlCancel Then
rtfText.SelPrint .hdc
End If
End With
End Sub
__________________

Last edited by suskumarsus; February 11th, 2012 at 02:07 AM.
Reply With Quote