|
-
Aug 13th, 2003, 05:52 PM
#1
Thread Starter
New Member
Print doesn't print
I'm developing an app using Visual Basic 6.0; i used the VB app wizard to get started. I added a print button and it works just fine: it shows the print dialog when clicked.. the bad thing is that when i actually click print in the dialog, the dialog just closes but no document is printed... ¿what's wrong with the code?
Her's the genereted code:
Private Sub mnuArchivoImprimir_Click()
On Error Resume Next
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ActiveForm.rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
ActiveForm.rtfText.SelPrint .hDC
End If
End With
End Sub
Also, how can i format the form so it is able to print in Letter size pages?
Thanks! and please help this newbie!
-
Aug 13th, 2003, 08:25 PM
#2
Is it just me or don't you actually tell it to print??
You have .ShowPrinter but no .Print
-
Aug 13th, 2003, 10:08 PM
#3
Thread Starter
New Member
Originally posted by lintz
Is it just me or don't you actually tell it to print??
You have .ShowPrinter but no .Print
Oops!.. missed that, anyway, it still doesn't print.. i get "Member or data not found" while compiling.. so.. í'm pretty sure it must be some other littel thing .. but, i don't know it.
Any other idea? Thanks anyway!
-
Aug 13th, 2003, 10:42 PM
#4
when you get the error compling your project work with the code that is highlighted.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|