Page 1 of 1
visual basic question
Posted: Fri Aug 19, 2005 12:33 am
by Tsakali
I'm looking to simply have a button that browses for a printer, or browses only the printers... I can't find any help on this.
My program requires for a user to be able to choose a printer, or more specificaly the user needs to specify the printer location/address, and I figured a browser would be helpful, if not expected in this day and age
Posted: Fri Aug 19, 2005 12:41 am
by R00k
I've hunted down a ton of VB stuff for printers at work. If you haven't gotten anything by then, I'll post some links up tomorrow.
Posted: Fri Aug 19, 2005 12:46 am
by Tsakali
thanx for helping a rookie out :icon30:
Posted: Fri Aug 19, 2005 4:55 pm
by Tsakali
good day rook :icon25:
Posted: Fri Aug 19, 2005 5:37 pm
by Cool Blue
You would have to write your own 'browser' to do that. May I ask what's wrong with using the default printer?
If the user already has the printers installed (drivers), using a simple printpreviewdialog() object will allow them to select which printer they want to print to.
Posted: Fri Aug 19, 2005 5:38 pm
by Cool Blue
Posted: Sat Aug 20, 2005 4:15 pm
by Tsakali
that website is a nightmare to browse. Thanx anyway.
Posted: Sat Aug 20, 2005 7:00 pm
by bitWISE
Cool Blue wrote:If the user already has the printers installed (drivers), using a simple printpreviewdialog() object will allow them to select which printer they want to print to.
That's what I was going to say. The print dialog is so common there had to be a built in control you could add.
Posted: Sat Aug 20, 2005 7:40 pm
by Denz
Code: Select all
Dim frm As New frmPreview
Dim CD As mscomdlg.CommonDialog
Set CD = frmPreview.CommonDialog1
CD.CancelError = True
On Error Resume Next
CD.ShowPrinter
If Err.Number = 32755 Then Exit Function
On Error GoTo 0
Printer.Orientation = cdlLandscape
If preview Then
Set PRN = frmPreview
Else
Set PRN = Printer
If PRN Is Nothing Then
Exit Function
End If
End If
You will probably need to ICQ me if you have any problems with this, I have this on one of the programs that I created.
I can give you more if you need it. It works great here.
150284426