supersonic Posted May 29, 2010 Posted May 29, 2010 Hi! I'm looking for a way to display the standard document properties dialog for a printer using DllCall(). Is there a way to realize this? For example, the following code: DllCall("winspool.drv", "bool", "SetDefaultPrinterW", "wstr", $sPrinter) ... sets the default printer. There are internal functions in WINSPOOL.DRV like "DocumentProperties" and "AdvancedDocumentProperties", but I am not able to implement them. Can somebody please help? Greets, -supersonic.
Fire Posted May 29, 2010 Posted May 29, 2010 Hi supersonic,I guess you are about File Property [size="5"] [/size]
supersonic Posted May 29, 2010 Author Posted May 29, 2010 (edited) @Fire: Hmm, sorry... That's not what I'm looking for...!? Or may be I'm wrong? I'm looking for a way to display the document properties window for a printer... You can achieve this with the following code line: RunWait(@ComSpec & ' /C ' & @WindowsDir & '\system32\rundll32.exe printui.dll,PrintUIEntry /e /n"' & $sPrinter & '"', @WindowsDir & '\system32', @SW_HIDE) ... but I would like to realize this with DllCall() or ObjCreate()... Greets, -supersonic. Edited May 29, 2010 by supersonic
jennico Posted November 6, 2010 Posted November 6, 2010 well, i don't think it's what you need, but you find the document settings in the registry:RegRead("HKCU\Printers\DevModePerUser",$sPrinter)it's a binary string and depends on the printer, so it is not possible to decrypt it. but by changing the settings and checking the reg string you can detect the needed setting and regwrite it.but, this is just a method to change the document settings, not what you need.regards j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
JoHanatCent Posted November 7, 2010 Posted November 7, 2010 Tried these options? DllCall('printui.dll', 'none', 'PrintUIEntryW', 'hwnd', 0, 'ptr', 0, 'wstr', '/?', 'int', @SW_SHOW)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now