[Mono-list] Strange window maximization behavior on Linux
LKeene
lionel.keene at gmail.com
Mon Jul 27 18:06:14 EDT 2009
Okay, by successively commenting out blocks I've traced the problem to the
following lines:
this.StartPosition = FormStartPosition.CenterScreen;
this.WindowState = FormWindowState.Maximized;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.Update();
I've gotten rid of these and set the properties in the form's partial class
and that seems to have fixed the problem.
-L
LKeene wrote:
>
> Hello all. I've some strange behavior on Red Hat that's not cropping up on
> windows or OSX. Here's what I've got: an extremely simple Windows Forms
> app wherein I've added the following to the form's constructor:
>
> this.WindowState = WindowState.Maximized;
>
> That's it. I ad nothing else. I compile and run. When I run under mono on
> my Windows box it works fine. I then try it on red Hat and Mono 1.9. It
> works fine there as well (i.e. the form is maximized upon startup).
>
> The problem is with my actual application (not the aforementioned test)
> where the above has no effect. My application is supposed to maximize the
> window and then, based on the client dimensions, do a bunch of drawing.
> I've added the following to the form's constructor:
>
> this.WindowState = WindowState.Maximized;
> this.Update();
>
> This has no effect i.e. the form is the default small size when run under
> Mono and Red Hat. I've tried with and without "Update()" called and it
> makes no difference, the form will not maximize upon startup. Out of
> desperation I tried changing the form's property in the property window to
> "Maximized" (I'm using VS2008) and then recompile/run. No go. The form is
> still small and centered. As I mentioned, this DOES work on the same
> computer in the tiny test app at the beginning of my post. Why would the
> form maximize properly in one case but not in the other...on the same
> computer? I do not explicitely size the form at any time other than at the
> beginning when I set the WindowState property to Maximized. I have no idea
> where to start looking for the problem on this one. Does anyone have any
> ideas at all? Can't imagine what it could be... :-(
>
--
View this message in context: http://www.nabble.com/Strange-window-maximization-behavior-on-Linux-tp24686260p24689133.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list