473,385 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How can I capture just the final resize event for a panel?



I have a form with a toolstrip, a panel and a status bar. On the panel I added an event handler for ClientSizeChanged but it calls
the handler umpteen times during a resize. Is there any way that I can just capture the final event when the user has finished
resizing? If it takes a relatively long time to regenerate the panel then the whole application is going to stutter.

Is ClientSizeChanged the best event to capture for this or is there something better?

Thanks,

Steve
Jul 25 '08 #1
1 2647
On Fri, 25 Jul 2008 08:58:15 -0700, steve <s_******@yahoo.comwrote:
I have a form with a toolstrip, a panel and a status bar. On the panel I
added an event handler for ClientSizeChanged but it calls
the handler umpteen times during a resize. Is there any way that I can
just capture the final event when the user has finished
resizing? If it takes a relatively long time to regenerate the panel
then the whole application is going to stutter.
If you don't want the control to redraw during resizing, then setting the
ResizeRedraw property "false" would probably address your concern.

As far as I can recall, the Control class doesn't have anything that will
let you know when resizing starts and ends. However, the Form class
does. If your Panel is resizing as a result of the containing Form
resizing, you can handle the Form.ResizeBegin and Form.ResizeEnd events to
track that.

Finally, while one of the above should be useful, there's always the
fall-back approach of setting a timer and not performing any work until
you go a certain amount of time after the most recent size change.

Pete
Jul 25 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Laxmikant Rashinkar | last post by:
Hi, I have an event handler that gets called whenever my panel is being resized. Since a lot of painting is going on whenever my component is being resized, I would like to paint my component...
0
by: Bisbal | last post by:
Hi All, I have created a class that simulates a MDI form by putting the 'child' inside a panel located in the 'parent' form. I had to do this because we use a custom UI that doesn't work...
2
by: Carl Gilbert | last post by:
Hi I am looking for either a component or technique to allow me to do the following: * Provide a panel with a background image * Resize the image to best fit the panel to maintain aspect...
8
by: Ken Sturgeon | last post by:
I have a button inside a panel control. Apparently I can't expect VB to respond to the button's _Click event. How do I capture the click event? Thanks Ken
1
by: rizwanahmed24 | last post by:
Hello I want to capture the event generated when a control (from toolbox) is added on to the panel at design time. I tried overriding OnControlAdded method, and capturing ControlAdded event but...
0
by: Filippo9 | last post by:
I'm using the IObject tecnology to modify a program. I have to capture the event resize of a form in this program. I obtain the handle with FindWindow("ThunderRT6FormDC", vbNullString). How can I do...
0
by: miks | last post by:
Hi, I have a problem when resizing form. Form is freezed for a moment and then resized. I have panel and picturebox in form. I have panel (full dock) in form and picturebox in panel. On panel...
3
by: John Kotuby | last post by:
Hi all, I am converting an ASPX 3.5 page in VB and VS 2008 from the standard postback to callbacks using an UpdatePanel. I had originally been adding an onload attribute to the Body tag in the...
4
by: =?Utf-8?B?Unlhbg==?= | last post by:
I have a winform containing a scrollable panel and a groupbox inside the panel. There is a button inside the groupbox. When that button is clicked; how do I capture and display the X and Y...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.