Page 2 of 3

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Sat May 23, 2009 4:11 am
by swapan
salamandra wrote::) Hi,

Thanks to all for your nice words and I am feeling very honored that you want
to keep my single code :oops:
I am searching for some additional information, and may be in a few days I'll get
post here a complete (or almost complete) set of commands to retrieve, restore and
define printers properties. ;)

[]'s Salamandra
Dear Salamandra,

You provided me and many others like me the simple way to get the Printer Dialog programmatically under our control. So you do deserve thanks from our bottom of heart for sharing your piece of R&D on printing with us. Not yet gone through the link you've provided.

I'm looking forward to your "search" for additional information regarding this. I too have googled a bit and seen some codes written in VB to retrieve and set printer properties through API calls. But I couldn't decipher much with my limited knowledge. When we select the Page Orientation and PaperSize from the Windows Printer Dialog, windows does stores it somewhere, we have to fetch those values from any API call or low-level command .........

Regards,

Swapan
[PS:BTW Salamandra, r u from Brazil? U know there are many supporters of Brazil (football team) in my city Calcutta :D ]

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Sat May 23, 2009 5:50 am
by Rathinagiri
I think the default printer settings would be stored in registry settings and that can be retrieved from HMG functions RegistryRead() and RegistryWrite()

It is in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Sat May 23, 2009 6:56 am
by swapan
rathinagiri wrote:I think the default printer settings would be stored in registry settings and that can be retrieved from HMG functions RegistryRead() and RegistryWrite()

It is in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers
Thanks Rathi for putting your thoughts.....

But this will hold all the printers names, now which one is default/selected printer among them? And I think this registry location may vary from windows version to version.

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Tue May 26, 2009 7:03 pm
by salamandra
Hi swapan,
Dear Salamandra,
You provided me and many others like me the simple way to get the Printer Dialog programmatically under our control. So you do deserve thanks from our bottom of heart for sharing your piece of R&D on printing with us. Not yet gone through the link you've provided.
I'm looking forward to your "search" for additional information regarding this. I too have googled a bit and seen some codes written in VB to retrieve and set printer properties through API calls. But I couldn't decipher much with my limited knowledge. When we select the Page Orientation and PaperSize from the Windows Printer Dialog, windows does stores it somewhere, we have to fetch those values from any API call or low-level command .........

Regards,

Swapan
[PS:BTW Salamandra, r u from Brazil? U know there are many supporters of Brazil (football team) in my city Calcutta :D ]
Thanks four your words. :oops:
I am developing a new print manager with some additional resources
(eg search network printers , install/Uninstall printers, define as default printer and
other resources).
I have very little time to spend in it, but it is almost 50% ready.
May be I'll get finished in two or three weeks, and my basic idea is once finished,
post it here in our forum (as FREE CODE), because I think that this print manager
could be a big help for many of our HMGF friends.
Regarding on how to retrieve printer's names, i think you can do as rathi suggested
and you can get the default printer using HMG function GetDefaultPrinter().

And.... YES, I am from Brazil (the land of soccer ;) ), but I was born in Argentina
(another land of soccer :lol: ) and came to Brazil almost 30 years ago ( a looooooooooooong time) :D .

Best Regards,


Salamandra

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Wed May 27, 2009 3:56 am
by swapan
salamandra wrote: I am developing a new print manager with some additional resources
(eg search network printers , install/Uninstall printers, define as default printer and
other resources).
I have very little time to spend in it, but it is almost 50% ready.
May be I'll get finished in two or three weeks, and my basic idea is once finished,
post it here in our forum (as FREE CODE), because I think that this print manager
could be a big help for many of our HMGF friends.
Eagerly waiting for your Open Source Product!
salamandra wrote: And.... YES, I am from Brazil (the land of soccer ;) ), but I was born in Argentina
(another land of soccer :lol: ) and came to Brazil almost 30 years ago ( a looooooooooooong time) :D .
No worries! 2nd biggest fans from Calcutta (Kolkata) are from Argentina! :D

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Wed May 27, 2009 12:30 pm
by Vanguarda
Hi friends,

Salamandra, i waiting for this open source function. I think that this will be very help for all us. It is amazing...

thanks a lot


regards,

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Thu May 28, 2009 6:58 am
by Rathinagiri
Me too. When would that be ready? Can you post some screenshots?!

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Thu May 28, 2009 10:10 am
by swapan
rathinagiri wrote:Me too. When would that be ready? Can you post some screenshots?!
Salamandra: Are we putting undue pressure on you?! :D Please take your time, but do share your this wonderful Print Manager with us.

-- Swapan

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Tue Jun 02, 2009 1:52 am
by salamandra
Hi to all,
swapan wrote:
rathinagiri wrote:Me too. When would that be ready? Can you post some screenshots?!
Salamandra: Are we putting undue pressure on you?! :D Please take your time, but do share your this wonderful Print Manager with us.

-- Swapan
Under pressure, no.... well... only a little bit :lol:
My new print manager it's 90% finished.
I am reviewing all the code trying to make it more readable, simple and light as much as possible.
(and I'm reviewing layout issues also)
By now, are about 700 lines of code, including main form and network search printers form.
I'd tested as much as i can, and it's working fine.
And for those who suffer from chronic anxiety ( :lol: :lol: :lol: :lol: :lol: ),
this is a screenshot
image_prt_mgr.JPG
image_prt_mgr.JPG (65.83 KiB) Viewed 4723 times

As I said, I'm still working in it, and as you can see the PROPERTIES button,
in background form is missing. ( he'll be back soon ;) )
I think, i have more one or two weeks until I've finished.
(I already have almost no time to spend with it)

As you can see, used language is PORTUGUESE, but I'd changed this to work
in accordance with HMG language selection, and sorry boys, only 3 language will be
availables for selection: PORTUGUESE, SPANISH and ENGLISH.
This means:
SET LANGUAGE TO PORTUGUESE => Portuguese translation
SET LANGUAGE TO SPANISH => Spanish translation
SET LANGUAGE TO ENGLISH => English Translation
SET LANGUAGE TO <OTHER_LANG.> => English Translation

Ok ?? ;)

On the other hand, will be easy to change any of the defaults languages to any other.
Based on the ENGLISH translation and GOOGLE translator ( :lol: :lol: :lol: :lol: :lol: :lol: )
you can easyly translate to your own language.

Well,it's all for now..... and be patient...

Best Regards,


Salamandra

Re: How To Fetch Printer Properties from the Selected Printer

Posted: Tue Jun 02, 2009 2:05 am
by Rathinagiri
Marvelous! Gr8.

Eagerly waiting for the final product. Thanks Salamandra for sharing.