J
jfp
I have a "master" form which launches an auxiliary form whenever the
user wants to print a report. Originally, this "print control" form
offered the choice of printing the report or exporting it as a Word doc.
The main form opened the print control form in dialog mode and
everything worked wonderfully -- the print control form maintained focus
and the main form stopped all processing until the user was done
printing; then the main form resumed from wherever it was.
I then added an option for report preview to the print control form.
Since the print control form was opened in dialog mode, focus kept
reverting from the report preview back to the print control form,
rendering the preview impossible to use. I then modified my code so
that the report preview was also opened in dialog mode. This fixed the
focus issue -- the user browses the preview as desired and, when done,
focus reverts to the print control form. Unfortunately, for some
reason, the preview window now cannot be resized by the user. Since the
user will often want to zoom to a larger magnification, resizing is
necessary.
The only way i have found to make things "work" is to drop dialog mode
entirely. This forces me to take care of the focus issue (which i can
do). It also, however, allows the main form to keep on running. I
might be able to fix this by adding a loop with a timer and a check to
see if the print control form is still open, but this seems a very ugly
way to go.
Any ideas ?
user wants to print a report. Originally, this "print control" form
offered the choice of printing the report or exporting it as a Word doc.
The main form opened the print control form in dialog mode and
everything worked wonderfully -- the print control form maintained focus
and the main form stopped all processing until the user was done
printing; then the main form resumed from wherever it was.
I then added an option for report preview to the print control form.
Since the print control form was opened in dialog mode, focus kept
reverting from the report preview back to the print control form,
rendering the preview impossible to use. I then modified my code so
that the report preview was also opened in dialog mode. This fixed the
focus issue -- the user browses the preview as desired and, when done,
focus reverts to the print control form. Unfortunately, for some
reason, the preview window now cannot be resized by the user. Since the
user will often want to zoom to a larger magnification, resizing is
necessary.
The only way i have found to make things "work" is to drop dialog mode
entirely. This forces me to take care of the focus issue (which i can
do). It also, however, allows the main form to keep on running. I
might be able to fix this by adding a loop with a timer and a check to
see if the print control form is still open, but this seems a very ugly
way to go.
Any ideas ?