I'm not sure you can save the actual printer setup. The options for the
printer on my computer (when using OpenPrinterDialog), are limited to amount
of copies and page range and it allows you to connect directly to the
printer setup itself (as you would from Control Panel).
But, yes, I believe you can reuse PrinterSetups (at least as far as *page
setups*), but I think you have to store them somewhere first.
Make a new Property: StoredPrintSettings as String
In a PushButton Action Event:
Dim Settings as String
Dim PageSetup as PrinterSetup
If StoredPrintSettings = "" then
PageSetup = New PrinterSetup
If PageSetup.PageSetupDialog Then
Settings = PageSetup.SetupString
Else
// Canceled
Return
End If
Else
PageSetup = New PrinterSetup
PageSetup.SetupString = StoredPrintSettings
If PageSetup.PageSetupDialog Then
Settings = PageSetup.SetupString
Else
// Canceled
Return
End If
End If
Dim g as Graphics
g = OpenPrinterDialog(PageSetup)
StoredPrintSettings = Settings
If you want to create a printer setup (page setup) that can be used even
when the application has been closed and reopened, save StoredPrintSettings
to a text file and read it back in, either by a pop-up menu or something
similar. You could even load the settings automatically when the
application is launched.
I just tried this and it worked perfectly, but I have to admit it's my first
attempt at printing, so there may be bugs. I'm not really sure what the
"larger Win32 print crash problem" refers to, but I hope this helps.
Thanks for your question as I have been avoiding the implementation of
printing for quite sometime now. This makes me feel much better...but I'm
probably fooling myself. When it comes to the 'real world,' it's probably
another story :)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>