Re: Odd behavior with WindowState
- From: "Michael C" <mike@xxxxxxxxxx>
- Date: Fri, 14 Dec 2007 11:56:12 +1100
"AMercer" <AMercer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:136B10DA-8C75-4DBB-80B9-925E39261311@xxxxxxxxxxxxxxxx
My earlier post stated that setting Visible to true will force a draw in
the
load event. The above ControlBox assignment is a second case. I assert
that there are more double draw cases, and I don't know what they are, so
don't ask me to dig out any more. Knowing two leaves me uncertain about
the
whole picture, and if I come up with a third, I will still be uncertain.
The
burden is not on me to do this research, testing, and documentation, it is
on
Microsoft. Nowhere in the documentation about Visible and ControlBox is
the
idea of an immediate draw discussed. Also, please don't tell me that I
should set ControlBox in the designer. It will probably fix this problem,
but the documentation gives no reason to prefer the designer over code. I
see no merit in replacing my workaround (with no basis in the
documentation)
with a 'do it in the designer' workaround (also with no basis in the
documentation).
As far as the load event goes, the double draw phenomenon is what the
workaround addresses. So, once more and with gusto, I stand by visible
false
at the top and true at the bottom. It takes care of all of the double
draw
behaviors, including those that I know about and those that I don't know
about. The workaround has never failed me, although it sounds like it is
not
helping the OP solve his problem. FYI, I started using this workaround a
while ago, back in the vs2003 fw1.1 days. One could argue that it is time
revisit it - against that, this roof ain't broke, so why fix it?
Fair enough, although I still think that applying a workaround to *every*
form for something that I have not encountered in 6 years of dot net
programming is unecessary.
.
- References:
- Odd behavior with WindowState
- From: Jerad Rose
- RE: Odd behavior with WindowState
- From: AMercer
- Re: Odd behavior with WindowState
- From: Herfried K. Wagner [MVP]
- Re: Odd behavior with WindowState
- From: AMercer
- Re: Odd behavior with WindowState
- From: Michael C
- Re: Odd behavior with WindowState
- From: AMercer
- Odd behavior with WindowState
- Prev by Date: Re: System tray // still running...............
- Next by Date: Re: Self-sufficient Winform app like Delphi?
- Previous by thread: Re: Odd behavior with WindowState
- Next by thread: Re: Odd behavior with WindowState
- Index(es):
Relevant Pages
|