Print Preview over Popup

ellenr

Registered User.
Local time
Today, 11:17
Joined
Apr 15, 2011
Messages
400
Put the finishing touches on a small db and went to put it on one of the user's laptops. Oops! The screen resolution didn't allow all of the buttons, etc. to be seen without using scroll bars. So, I decided to squeeze each screen's controls up and left (on my development computer) so most any computer could view them. Ugly. Then, decided to set each screen as a popup without borders, all with the same background color. Perfect. You cannot tell the forms are popups and all of the controls are beautifully centered. Then I clicked on a button that previews a report. Alas, it opened beneath the popup screens. Is there any way to open a print preview on top of a popup?
 
There are several solutions to this including:
a) minimise or close the calling form when the report is opened. Then reopen the form when you close the report
b) make the report itself popup

However making all your forms popup is not a good idea.
As these open on a separate layer on top of the application window it can make it difficult to control their position (though you are maximising them all)
In fact, when you start building layer upon layer of steps as you have described it should be a warning that a fresh approach is needed

Have you considered using form resizing code which will adjust the size and position of your forms & controls automatically?
I've used free resizing code by Jamie Czernak for many years in all my commercial apps & many of my example apps as well. For example, have a look at the latest version of my app to manage the application interface that I uploaded here yesterday https://www.access-programmers.co.uk/forums/showthread.php?t=293584

If you do look at that, I recommend you remove the popup property from most of the forms you resize. Good luck

NOTE: That app actually includes a couple of reports opened in print preview from a popup form.
 
c) hide the form
d) develop in the largest resolution involved (highest numbers)
Once there was a few holdouts still bent on 800x600 while everyone else was using 1024x768. The holdouts had to scroll rather than everyone else buying magnifying glasses. I think there is only so much you should have to do to accommodate with db design as there's always someone who wants streamers and a bell if you get my drift.
 
Last edited by a moderator:
That's exactly the situation that form resizing code solves.
The forms and controls automatically scale up in terms of size and position for any size monitor and resolution.
Just one line of code, ResizeForm Me needed in the form load event of each form. The resizing module code does everything else for you.
Only rarely does it require tweaking.
 
isladogs, I was excited to find your code. I put ResizeForm Me in the onload event of my opening form, and expected the result to stay basically the same on this computer. I was then going to test by changing the screen resolution and opening the db again. I have attached the result. What am I doing wrong? I don't know why the upload of After.png changed it to After.jpg.
 

Attachments

  • Before.PNG
    Before.PNG
    69.5 KB · Views: 117
  • After.jpg
    After.jpg
    86.7 KB · Views: 118
I like to generate excitement .... even if its followed by disappointment. :D
For this to work well, there are certain design rules to follow
The first time may be a bit tricky but once you get the hang of it...its easy!
Perhaps I need to do a tutorial on using this at some point

For now, some questions:
1. Are you using overlapping windows (OW) or tabbed documents (TD)?
I prefer OW. Wth TD there is a complication with tab controls
2. Did you alter the base resolution settings in modResize?
I have these set as 800*600 so it scales up
3. Is the design form size smaller than you want it to be after resizing?
I have a base form size of 20.5*12.5cm ...again so it scales up
4. In design view are you using a smaller font than usual?
I use Calibri 7pt ...again so it scales up
5. Similarly controls need to be smaller than normal for the same reason
6. Do you have any subforms or tab controls on your form?

I also suggest you upload a screenshot in design view
 
Yes, I am using overlapping windows (OW).
No, not 800*600--didn't realize I had to. (Probably a game ender, as I had already finished my design work when I discovered one installation couldn't use as is). Wish the resize could both downsize and upsize.
The design form after resizing was huge--development computer could see maybe half of the controls.
Yes to the subform question.

Anyway, I have abandoned the resizing. I am fascinated by a number of routines in your sample db, however, and I will surely make use of them in the future. For the moment, I have set a base (empty) screen with only two popup forms. When I open the print preview reports, I toggle the visible property of the popups. I can see it would be impossible task for a more complicated program, but for this one it works nicely. Also, if I weren't so picky, centering everything wouldn't have been important enough for me to spend several days experimenting!

I do thank you for your help! I apologize for not answering sooner.
 
Hi ellen

Its clearly much easier if you work on a new form rather than adjust something you already have.

I will do a proper tutorial on using this over the next week or so. Its going to be quite lengthy in order to cover all features & various tips & hints.

Just to clarify though:
1. The code currently specifies a 'base resolution' of 800*600 though that can be changed to any resolution that suits your needs. However I certainly don't develop in that resolution. My primary monitor is in fact 1680*1050.

What is actually means is my base form size in design view is such that if I did use 800*600, it would fill the screen.
By experiment, I found that size is 20.5cm*12.5cm approx
So my forms are designed in that size & will scale up to fill the screen in any other higher resolution
More accurately it will fill the total height of the screen.
Due to different screen shapes (4:3, 16:9, widescreen) may be slightly less than the total width. Whilst I could stretch it to fit horizontally, there would be some distortion by doing so

I also design with font = Calibri 7pt which after resizing becomes Calibri 11pt

I could change the base resolution to say 1024*768 and if I did so, the base form size would be a bit bigger & font size 8pt but it would scale up from that equally well

Hope that helps rather than confuses you further

If you want to send me a PM or better still an email, I will contact you once the tutorial is ready

BTW - which parts of the demo app interested you?
 
I was particularly interested in how it hides taskbar, nav, etc., and show and hide Access application window. I can imagine lots of things to do with those.

Anyway, thank you!
 

Users who are viewing this thread

Back
Top Bottom