By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,438 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

API Dialog for SelPrint

P: n/a
My Common Dialog ActiveX isn't working at all and I'm looking for an
API alternative. MS Access 2K's Rich Text ActiveX has a printer
command "SelPrint" and the help screen gives me a print routine that
reveres to the Common Dialog ActiveX. Does anyone know how to modify
this example to call API printer and work the same way as the Common
Dialog function. If you have a tested code that works, I would
appreciate your help. See example below. How can I get this to work
with API?

SelPrint Method Example

This example prints the formatted text in a RichTextBox control. To
try this example, put a RichTextBox control, a CommonDialog control,
and a CommandButton control on a form. Paste this code into the Click
event of the CommandButton control. Then run the example.
Private Sub Command1_Click()
CommonDialog1.Flags = cdlPDReturnDC + cdlPDNoPageNums
If RichTextBox1.SelLength = 0 Then
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDAllPages
Else
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDSelection
End If
CommonDialog1.ShowPrinter
Printer.Print ""
RichTextBox1.SelPrint CommonDialog1.hDC
End Sub
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.