For some time now, a few people who have been using my application has complained about some strange behaviour in how the WinForm is being drawn.
The form has one splitcontainer
with panel1
being fixed.
I have not been able to reproduce their problems, until today.
I just installed the app on a laptop running a 32 bit version of Win7 enterprise.
(app is built and running without problem on my computer running 64 bit version of Win7 ent.)
To see what was going on, I copied the project files over to the laptop and opened it with Visual Studio 2012 to see what was going on. However, is has me stunned as I don't know what do do about it.
On the dev. machine (my 64 bit win7 ent), the specifications for the form (and split container) sizes are as follows:
- Form height: 383
- Form Width: 707
- Split container height: 321
- Split container Width: 691
- Splitter distance: 380
When I load the project on the laptop, the specifications are changed to this:
- Form height: 419
- Form Width: 859
- Split container height: 397
- Split container Width: 921
- Splitter distance: 380
Now I can finally understand the frustration with some people not being able to see the program as how it is supposed to be seen.
On the 32 bit machine, the splitter is partly covering a few buttons, which obviously making the program hard to use since they can't see the text.
Is there any reason why this happens?
I mean, if the original code is set to a specific size value, isn't that how it should be no matter where the program is run? (Given the user doesn't resize of course).
And then most importantly, is there any way I can solve this without having to build two separate versions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…