473,396 Members | 2,014 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,396 software developers and data experts.

resizing a form

I need to call some procedures after user resized the form.
Not while he is resizing it, but AFTER resizing is finished, i.e. user
released mouse button.
Any ideas how to do this?
Thank you
Nov 17 '05 #1
5 1457
Hi,
Not sure if this is correct, but I bit it's

At the resiziing event set a flag , hook the mouse up event of the form then
check if the flag is set, if so do your procedures and remember to set off
the flag.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com...
I need to call some procedures after user resized the form.
Not while he is resizing it, but AFTER resizing is finished, i.e. user
released mouse button.
Any ideas how to do this?
Thank you

Nov 17 '05 #2
Thank you Ignacio, but problem is that MouseUp/Down events are not fired when
you click on window's border.
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
Not sure if this is correct, but I bit it's

At the resiziing event set a flag , hook the mouse up event of the form then
check if the flag is set, if so do your procedures and remember to set off
the flag.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com...
I need to call some procedures after user resized the form.
Not while he is resizing it, but AFTER resizing is finished, i.e. user
released mouse button.
Any ideas how to do this?
Thank you


Nov 17 '05 #3
The form's ResizeEnd is fired after the mouse button is released.

Andrew
Nov 17 '05 #4
In which platform?
There is no such event in .NET 1.1
"amaca" wrote:
The form's ResizeEnd is fired after the mouse button is released.

Andrew

Nov 17 '05 #5
You'll have to override the WndProc(ref Message m) method of the Form.
Once you do that, you'll have to look for the message that is sent for
a resize and kick off your methods. I'm not entirely sure what the
constant is for the window resize, but you should be able to find it
fairly easy by experimenting with debug statements and a little trial
and error.

Something like this might do:

bool _blnResizing = false;

protected override void OnResize(EventArgs e)
{
_blnResizing = true;
base.OnResize(e);
}

protected override void WndProc(ref Message m)
{
if(_blnResizing && m.Msg == 533)
{
//TODO: add your code here.
_blnResizing = false;
}
base.WndProc(ref m);
}
I'm not Exactly sure that 533 is the message number in question but I'm
*pretty* sure it's your machine saying you've performed a non-client
mouseup. You may get a better idea by scanning the Win32.h file on your
machine and looking at the names of the constants.

I hope that's helpful.

Ben Lesh
Author, SlickWin Forms Control Suite
Fully Customizable .NET Component Suite
http://www.slickcode.com/slickwin.aspx

Nov 17 '05 #6

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

Similar topics

0
by: TJ Talluto | last post by:
<facts> I have a "month calendar" that always displays exactly 42 days... and alongside is a vertical box that displays the detail (form fields) of any particular select event that appears on the...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
1
by: Terry | last post by:
I've seen several posts from people who have seen this flashing in TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a...
12
by: Søren Reinke | last post by:
Hi there I have a little problem. How do i make sure that a graph is not redrawn while the form with the graph is being resized ? I have tried to add a mouse up/down event handler on the...
4
by: Thomas Richter | last post by:
Hi, I can't get of the black flicker when I resize my form. this = Mainform : System.Windows.Forms.Form If I set the size from 300 to 500 I see for ca 500ms some black areas. I try to solve it...
6
by: John Bowman | last post by:
Hi All, I must be missing something really obvious, so I'd appreciate someone helping me out. I have a simple Windows form that currently only has a title bar (aka the Text Property is set) and...
11
by: Sharon | last post by:
I'm writing a new control derived from UserControl. I need to get an event when the control is done resizing. I tried the Resize, SizeChanged, Move and the Layout events and I also tried to...
13
by: Martin Ho | last post by:
I know this must be trivial for many of you. But I am playing with this and can't figure it out. I have a form, on that form is one panel which has 3 textboxes, when I run my program and...
6
by: JDeats | last post by:
I have a WinForms based application written for the .NET Framework 2.0 and in this application I need to be able to be able to take some action in code when the user finishes resizing the form. ...
10
by: mishrarajesh44 | last post by:
hii all, I am facing a problem currently.. i have a script for image uploading and resizing.. the image uploading takes place properly for every size images.. but, the resizing works for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.