•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 391,584 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,676 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 515 | Replies: 4 | Solved
![]() |
what have you meant by printer properties?
plz explain in detail.
or you can try this :-
add the component Microsoft Common Dialog Control 6.0 from Project->Components.
make an instance of it on your form.
now take a comman button and place this code,
It will show you the windows Print dialog box (the same one which you might be seen when trying to print documents from external windows applications like Notepad,wordpad,etc.
using API becomes more advance technique. you can API to access printer properties and configure it right through your code like finding its driver, setting up proper port, sending print commands,etc.,etc. For API reference Visit This Link.
regards
Shouvik
plz explain in detail.
or you can try this :-
add the component Microsoft Common Dialog Control 6.0 from Project->Components.
make an instance of it on your form.
now take a comman button and place this code,
Private Sub Command1_Click() CommonDialog1.ShowPrinter End Sub
It will show you the windows Print dialog box (the same one which you might be seen when trying to print documents from external windows applications like Notepad,wordpad,etc.
using API becomes more advance technique. you can API to access printer properties and configure it right through your code like finding its driver, setting up proper port, sending print commands,etc.,etc. For API reference Visit This Link.
regards
Shouvik
Last edited by choudhuryshouvi : Apr 5th, 2008 at 11:10 am.
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Have a problem? Don't worry just give me a call and I'll fix it for you.
try this following code :
hope this helps...
vb Syntax (Toggle Plain Text)
Private Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, pDefault As Any) As Long Private Declare Function ClosePrinter Lib "winspool.drv" (ByVal hPrinter As Long) As Long Private Declare Function PrinterProperties Lib "winspool.drv" (ByVal hwnd As Long, ByVal hPrinter As Long) As Long Private Sub Form_Load() Dim hPrinter As Long OpenPrinter Printer.DeviceName, hPrinter, ByVal 0& PrinterProperties Me.hwnd, hPrinter ClosePrinter hPrinter End Sub
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
yeah...you're welcome
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
- Displaying printer properties (Visual Basic 4 / 5 / 6)
- Brand-new printer only printing blank pages (Peripherals)
- Problems with Epson 600 Stylus Printer (Windows 9x / Me)
- Sending PCL3 Laserjet files to USB printer (Peripherals)
- Shared Printer (C#)
- Shared Printer Problem.... (Windows NT / 2000 / XP / 2003)
- MSFT Printer Permissions (Windows NT / 2000 / XP / 2003)
- Brother Hl-1440 laser printer, light print problem (Peripherals)
- Properties (Java)
- printer problems (Windows 9x / Me)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: how to show item in list box??
- Next Thread: Dialog Box



Linear Mode