Re: Strange behaviour of form
Been a long while since I did anything in VB6. However, if you are just using the menu for a popup menu, try the code from this thread. It uses the API so you shouldn't have an issue with the size of the form.
http://www.codeguru.com/forum/showth...95#post1280395
1 Attachment(s)
Re: Strange behaviour of form
Hi Gremmy
I've removed the menu items you added so that the menu is the same as it was when I send it the first time. If you run it you will see the form height is reported as 9300 while it is set in the form properties as 9000 (or 300 more than is set in the properties if another size is set there)
If you now delete the last entry in the menu named mnuSaving (Saving) and you run it again you will see that the form height is reported as 9000, the same as set in the form properties.
As I said initially, it's not a huge problem as it can be 'fixed' by setting the form height in the Form_Load event and it will display correctly. I just found it to be strange behaviour.
Re: Strange behaviour of form
Everything works fine for me :eek: :confused:
Have you considered redsigning the form, IOW, add a new form and add all the necessary controls to it, and then test it ¿
Re: Strange behaviour of form
Well in playing around with it, i cant replicate the problem..
I'm almost sure that it's a problem with your system or install, and not so much with VB6..
1 Attachment(s)
Re: Strange behaviour of form
Narrowed the problem down to a combination of the menu and form StartUpPosition property.
Attached is the same project now with three forms.
FormA has the menu and StartUpPosition is set to CenterOwner - height incorrect at 9300.
FormB has exactly the same menu and StartUpPosition is set to WindowsDefault - height correct at 9000.
FormC has the menu with one less menu item and StartUpPosition set to CenterOwner as in FormA - height correct at 9000
Re: Strange behaviour of form
Take out the Crystal Report Reference that you have in there and see if that makes a difference. I couldn't test it on Vista 64bit
Re: Strange behaviour of form
The form is always the correct size for me as well. Do you have windows xp "themes" enabled within VB, or for the app? The default xp theme has a large TitleBar - might that account for the extra pixels?
If you want the form to be full screen, can you not set the WindowState property to 2 - Maximized?
Re: Strange behaviour of form
David
Removed all the references and still the same on my system.
WizBang
No themes or such. I want the form to be the 9000 x 12000 that I specified. All my forms is designed around that size.
So it seems the problem is only on my system. Thanks in any case guys, I'll just get around it by setting the height in the form load event.