The resize event does fire before load, that is windows sequence of events,
its given. It fires 4 times.. that is interesting.. maybe your resize code
is causing it to do that..
if you want not to fire the resize, set a boolean variable make it false in
the form constructor, then set it to true after the Load event's last line
of code. Use this boolean to drive your code in resize.
Private Sub New()
{
blnVariable = false
Intialziecomponent()
..
}
Private sub Form1_Load(...)..
{
'Code starts here...
'Last Line of Code..
blnVariable = true
}
Private Sub Form1_Resize (... )..
{
if blnVariable then
'execute resize code.. here..
end if
}
VJ
"Rob Richardson" <th*****@n2net.net> wrote in message
news:ur**************@tk2msftngp13.phx.gbl...
Greetings!
I have a form with a listview, a menu, and a few text boxes, labels and
command buttons. I want to resize the listview when the form is resized
to that the widths of the spaces between the borders of the listview and the
borders of the form remain constant. I am finding this to be unexpectedly
hard. For one thing, I initialized some values in the form's Load event,
and I'm doing the control resizing in the form's Resize event. But I am
finding that the Resize event fires first! Actually, the Resize event
fires four times before the form's Load event! How can this be?
Thanks!
Rob, who obviously has some fundamental flaws in his understanding of
event sequences.