Results 1 to 5 of 5

Thread: [RESOLVED] Me.SizeChanged and Me.Resize? What's the difference?

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2010
    Posts
    55

    Resolved [RESOLVED] Me.SizeChanged and Me.Resize? What's the difference?

    Hi all.

    What's the difference between the SizeChanged event and the Resize event?

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Me.SizeChanged and Me.Resize? What's the difference?

    The only difference that I am aware of and I could be wrong is that Resize will be called whenever SizeChanged is called but not vice versa... otherwise it is the same... But like I mentioned I could be wrong...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3
    New Member
    Join Date
    Oct 2009
    Location
    Michigan
    Posts
    6

    Re: Me.SizeChanged and Me.Resize? What's the difference?

    Cooi,

    I searched MSDN for the control events for Resized and SizeChanged and found that there is a slight difference in these two events. The resized event is fired when the control is resized. The SizeChanged is fired when any of the Size properties are changed.

    So, IF i am reading the MSDN library correctly (and someone please correct me if I am wrong), when the end user changes the size of a control, the resize event would fire and then the SizeChanged event would fire. If the size of a control is changed programmatically the SizeChanged event would fire and then the resize would fire.

    I had never really thought about the order of these events and never had any issue to use them, so I hope I am reading the information correctly ... anyone else???


    Thanks
    Robert

  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2010
    Posts
    55

    Re: Me.SizeChanged and Me.Resize? What's the difference?

    If they fire at the same time (I mean same event), why are there 2 events then that do the same things?

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Me.SizeChanged and Me.Resize? What's the difference?

    The Resize event was added first and then the SizeChanged event was added to match the standard SomePropertyChanged pattern for data-binding purposes. The Resize event was presumably already been used in code so was not removed. There is effectively no difference.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width