0

My Windows forms application creates the user menus at runtime given the user access privileges.

It works fine, but when the app is minimized, then all menus vanish. The space is used, but the names and icons are gone (obviously no sub-menu is shown, due to top level menu items are gone)

It is coded using the class ToolStripMenuItem and previously this code is set:

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

Does someone have seen this behaviour?

Regards

Daniel.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    Share a simple code that reproduces the problem and image of your form before and after of minimize. It would help other users to help you. – Reza Aghaei Mar 25 '16 at 01:17

1 Answers1

0

Murphy's... Months stuck with this... and the solution was as simple as this:

When creating the MenuStrip objects I set the AutoSize property to false. I commented that line and it worked perfectly.

Thank you Reza Agahei for reading this and being concerned about this problem.

I can't understand fully why this happens... but what is working... musn't be even stared at.

I didn't post any code because the menus where generated through abstract model objects invoked through reflection, but I will follow your advice Reza, if I have another issue.

Thanx.

PS. I love this site, I always have found answers to my problems here, and now I'm happy to be part of it.