Saving Preview Screen Size and Location To Inifile
I'd like to uses an ini file to keep track of the last used size and
location of the print preview window.
When the print preview window displays I'd like to read the inifile and
set the Top, Left, Width, Height & WindowState and then have the print
preview window uses those values. When the print preview window closes,
I'd like to save the Top, Left, Width, Height and WindowState to the
inifile.
I use the OnShow and OnClose events to accomplish this for the main
form of my application. However, these events are not available on the
ppReport1 object.
What is your recommendation for setting and saving the Top, Left,
Width, Height & WindowState of the print preview window?
--
Michael Riley
GySgt USMC Retired
http://capecodgunny.blogspot.com/
location of the print preview window.
When the print preview window displays I'd like to read the inifile and
set the Top, Left, Width, Height & WindowState and then have the print
preview window uses those values. When the print preview window closes,
I'd like to save the Top, Left, Width, Height and WindowState to the
inifile.
I use the OnShow and OnClose events to accomplish this for the main
form of my application. However, these events are not available on the
ppReport1 object.
What is your recommendation for setting and saving the Top, Left,
Width, Height & WindowState of the print preview window?
--
Michael Riley
GySgt USMC Retired
http://capecodgunny.blogspot.com/
This discussion has been closed.
Comments
The preview form can be accessed using the Report.PreviewForm property.
If for instance you would like to alter the size or position of the
preview form, you could assign the PreviewForm.OnShow event inside the
Report.OnPreviewFormCreate event.
Note that for position, the default Position property of the preview
form is poFormCenter. This would need to be changed.
The best way to alter the behavior of the preview form is to create a
custom previewer.
http://www.digital-metaphors.com/rbWiki/Plugins/Dialogs/Preview_Plugin
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com