This is a multi-part message in MIME format.

------=_NextPart_000_006F_01C35826.3D8DCA90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

What is the differnce between OnResize and OnSizeChanged events in =
windows forms.

Thanks
Rajeev
------=_NextPart_000_006F_01C35826.3D8DCA90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD><FONT face=3DVerdana><FONT size=3D2>
<BODY>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>What is the differnce between OnResize and OnSizeChanged events in =
windows=20
forms.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>Rajeev</DIV></BODY></HTML></FONT></FONT>

------=_NextPart_000_006F_01C35826.3D8DCA90--

Re: OnResize and OnSizeChanged by Rajeev

Rajeev
Fri Aug 01 05:20:10 CDT 2003

This is a multi-part message in MIME format.

------=_NextPart_000_00A1_01C35844.96AB6060
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks for the info.

Rajeev.
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message =
news:#JECR#AWDHA.2360@TK2MSFTNGP10.phx.gbl...
Internally, OnSizeChanged calls OnResize so they are pretty tightly =
linked.

The OnResize method is responsible for invalidating the control if the =
ResizeRedraw style is set.

Hope this helps.

--=20
Bob Powell [MVP]
C#, System.Drawing

Check out the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Buy quality Windows Forms tools
http://www.bobpowell.net/xray_tools.htm

New Tips and Tricks include creating transparent controls
and how to do double buffering.

"Rajeev Soni" <rajeev_css@rediffmail.com> wrote in message =
news:#uZF8e$VDHA.2052@TK2MSFTNGP10.phx.gbl...
Hi,

What is the differnce between OnResize and OnSizeChanged events in =
windows forms.

Thanks
Rajeev
------=_NextPart_000_00A1_01C35844.96AB6060
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DVerdana size=3D2>Thanks for the info.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Rajeev.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Bob Powell [MVP]" &lt;<A=20
=
href=3D"mailto:bob@_spamkiller_bobpowell.net">bob@_spamkiller_bobpowell.n=
et</A>&gt;=20
wrote in message <A=20
=
href=3D"news:#JECR#AWDHA.2360@TK2MSFTNGP10.phx.gbl">news:#JECR#AWDHA.2360=
@TK2MSFTNGP10.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Internally, OnSizeChanged calls=20
&nbsp;OnResize&nbsp;so they are pretty tightly linked.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The OnResize method is responsible =
for=20
invalidating the control if the ResizeRedraw style is =
set.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hope this helps.</FONT></DIV>
<DIV><BR>-- <BR>Bob Powell [MVP]<BR>C#, System.Drawing</DIV>
<DIV>&nbsp;</DIV>
<DIV>Check out the GDI+ FAQ<BR><A=20
=
href=3D"http://www.bobpowell.net/gdiplus_faq.htm">http://www.bobpowell.ne=
t/gdiplus_faq.htm</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>Buy quality Windows Forms tools<BR><A=20
=
href=3D"http://www.bobpowell.net/xray_tools.htm">http://www.bobpowell.net=
/xray_tools.htm</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>New Tips and Tricks include creating transparent controls<BR>and =
how to=20
do double buffering.<BR></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Rajeev Soni" &lt;<A=20
=
href=3D"mailto:rajeev_css@rediffmail.com">rajeev_css@rediffmail.com</A>&g=
t;=20
wrote in message <A=20
=
href=3D"news:#uZF8e$VDHA.2052@TK2MSFTNGP10.phx.gbl">news:#uZF8e$VDHA.2052=
@TK2MSFTNGP10.phx.gbl</A>...</DIV><FONT=20
face=3DVerdana><FONT size=3D2>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>What is the differnce between OnResize and OnSizeChanged events =
in=20
windows forms.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
=
<DIV>Rajeev</DIV></BLOCKQUOTE></BLOCKQUOTE></FONT></FONT></BODY></HTML>

------=_NextPart_000_00A1_01C35844.96AB6060--


Re: OnResize and OnSizeChanged by Jay

Jay
Fri Aug 01 11:09:00 CDT 2003

Rajeev,
My understanding is:

OnResize occurs when the window receives a WM_RESIZE message from Win32.

OnSizeChanged occurs when the Size property changed.

As Rob stated, OnSizeChanged calls OnResize, also somehow when OnResize
occurs the Size property itself changes...

Also realize that OnResize will cause OnLayout to be called outside of
matching calls of the SuspendLayout and ResumeLayout functions.

I normally use OnLayout to change the layout of controls in respond to a
sizing event. As OnLayout is protected by the SuspendLayout & ResumeLayout
functions.

Hope this helps
Jay

"Rajeev Soni" <rajeev_css@rediffmail.com> wrote in message
news:%23uZF8e$VDHA.2052@TK2MSFTNGP10.phx.gbl...
Hi,

What is the differnce between OnResize and OnSizeChanged events in windows
forms.

Thanks
Rajeev