ResizeForm Me Issue with Navigation Form (1 Viewer)

dgreen

Member
Local time
Today, 01:09
Joined
Sep 30, 2018
Messages
397
@isladogs

I've implemented your code that maximizes the Access database to the Main Window and then opens the form, maximizing the fonts. It works well on my Tips form but poorly on my navigation form. Visual attached (what it looks like without the code and on the right with the code).

The text on the buttons is increasing but not consistently. On some of them the text grows to the size of the button (e.g. see the bottom left). In others the text wraps too early (e.g on the left side - like the Contacts, Organizations, Definitions/Acronym buttons)
Most of the buttons are disappearing from the tab control.

Is this a known issue or something that can be fixed?
Picture3.png
 

isladogs

MVP / VIP
Local time
Today, 07:09
Joined
Jan 14, 2017
Messages
18,211
Without looking at your form, I'm unable to suggest why you may be having problems.
Have you read my extended website tutorial on automatic form resizing?

If you have done so, you will have read that Tab controls can be tricky to resize though with care they still work well

I can also tell you that the MS navigation forms are notoriously problematic if you want to make anything more than minor changes to them.
For that reason many developers, such as myself, avoid using them and 'roll their own'

Two other points:
1. Resizing works well if forms are designed in a lower resolution and scaled up...but not the other way around.
It is also best to plan for the use of form resizing in the initial development rather than try to add it later on
2. The fact that some control labels are resized and others not MAY be related to your VBA error trapping settings.
Open the VBE and go to Tools...Options then click the General tab.
Make sure Error Trapping is NOT set to Break On All Errors. It should be Break on Unhandled Errors

Also, have you now got the dimmer form effect working following my reply to another of your threads yesterday?
 

dgreen

Member
Local time
Today, 01:09
Joined
Sep 30, 2018
Messages
397
Can you point me to the article you mentioned above?

I had removed all of the other code and forms from the previous example and am using yours exclusively.
The VBA is set to Break on Unhandled Errors.
The Navigation form I'm using is built from Design view and isn't one from the Access templates.
The form is smaller than when I use the code to Resize, so I think I'm executing your statement to design in the lower resolution.

I'll build a mini-database and if it performs the same way, I'll upload it and let you tell me where I'm going wrong.

Without looking at your form, I'm unable to suggest why you may be having problems.
Have you read my extended website tutorial on automatic form resizing?

If you have done so, you will have read that Tab controls can be tricky to resize though with care they still work well

I can also tell you that the MS navigation forms are notoriously problematic if you want to make anything more than minor changes to them.
For that reason many developers, such as myself, avoid using them and 'roll their own'

Two other points:
1. Resizing works well if forms are designed in a lower resolution and scaled up...but not the other way around.
It is also best to plan for the use of form resizing in the initial development rather than try to add it later on
2. The fact that some control labels are resized and others not MAY be related to your VBA error trapping settings.
Open the VBE and go to Tools...Options then click the General tab.
Make sure Error Trapping is NOT set to Break On All Errors. It should be Break on Unhandled Errors

Also, have you now got the dimmer form effect working following my reply to another of your threads yesterday?
 

dgreen

Member
Local time
Today, 01:09
Joined
Sep 30, 2018
Messages
397
@isladogs Attached is your database with my Navigation Form in the place of your Welcome form. Dim works, ResizeForm sort of works as you'll see. I'll look over the link you provided.
 

Attachments

  • DimBackground v2 (Navigation Form).zip
    479.3 KB · Views: 96

isladogs

MVP / VIP
Local time
Today, 07:09
Joined
Jan 14, 2017
Messages
18,211
It would have been better if you had checked the app before uploading.
Despite my warnings, you uploaded an app that I could only close by shutting down my PC.

This was the reason
Capture.PNG


FWIW the form displayed correctly on my PC with the dimmed background when I did enable content.
However none of the buttons worked which is why I couldn't get out of the app without shutting down.

Sorry but I'm not prepared to spend further time on this.
You should have made the effort to read the article before uploading the app.
However, there is no reason to use form resizing unless you want to.
Just remove the line ResizeForm Me from Form_Load and delete the module modResizeForm
 

dgreen

Member
Local time
Today, 01:09
Joined
Sep 30, 2018
Messages
397
Thank you for the time you did provide. It got me a little further along.

Sorry. I had removed the code behind the buttons but I did leave the close on the upper right of the form. I did test it before I uploaded it and I didn't have an issue closing the form.

While I did read the article, I'm sure there were nuances that I missed.

Anyway, thanks for your time.
 

isladogs

MVP / VIP
Local time
Today, 07:09
Joined
Jan 14, 2017
Messages
18,211
As before, I tested on a tablet. I couldn't close the form or do anything else with the background dimmed.
Also, I was unable to use the three fingered salute as I couldn't access the on screen keyboard.

From your earlier comments, you hadn't read the resizing article before uploading.
The topic is far from trivial but the feature works well when used as an integral part of the development process
 

Users who are viewing this thread

Top Bottom