473,545 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Window Resize

Hi there,

Since my last questions wasn't very clear, I will do it in a different way.

I want to resize my app but while resizing I dont want to see content of the
form, I just want to see the window border, then on release, the form
reappears, just like when we use "Show window contents while dragging" on the
windowsXP appearance settings...

Any Ideas in how to do it?
Nov 17 '05 #1
1 3119
Hi Diogo,
you could try not redrawing any of the controls on the form until after
the resize has occurred, at which point you can call Invalidate() to redraw
your form. This will nearly give the effect you are looking for. You would
invalidate on the Idle event of the application when there is no more work to
be processed by the application. For example:

private bool _Idle = false;

protected override void OnResize(EventA rgs e)
{
//We only want to do this processing the first time resize is called
if(!_Idle)
{
//add event handler to wait for idle event when we can redraw the
screen
//after a resize has completed
_Idle = true;

//stop any controls being redrawn
this.SuspendLay out();

//add the event handler
Application.Idl e += new EventHandler(Ap plication_Idle) ;
}
base.OnResize (e);
}
private void Application_Idl e(object sender, EventArgs e)
{
//if we are idle
if(_Idle)
{
_Idle = false;

//remove the event we do not want it any more
Application.Idl e -= new EventHandler(Ap plication_Idle) ;

//allow controls to be redrawn
this.ResumeLayo ut();

//cause form to be repainted after the resize
this.Invalidate ();
}
}

Hope that helps
Mark R Dawson

"Diogo Alves - Software Developer" wrote:
Hi there,

Since my last questions wasn't very clear, I will do it in a different way.

I want to resize my app but while resizing I dont want to see content of the
form, I just want to see the window border, then on release, the form
reappears, just like when we use "Show window contents while dragging" on the
windowsXP appearance settings...

Any Ideas in how to do it?

Nov 17 '05 #2

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

Similar topics

2
12778
by: Put 030516 in email subj to get thru | last post by:
I've always been bothered about having to statically declare the size of a Java applet window (container?) in the calling HTML. I've always wanted the moral equivalent of width=50% statement (of the window or frame). I'm trying to use Javascript to do so. I can sort of get an example working in a Mozilla browser: > <!-- This works on...
2
1837
by: Charles Packer | last post by:
From one of the online Javascript tutorials, I learned how to open a new window and set its size. I'm building a page that has several small photographs, and I want to let the viewer examine either a full size image or an image with supporting detail. It's the same idea used on lots of Web sites that show thumbnails where you click on one and...
4
2634
by: David Logan | last post by:
Hello, I am trying to open a window with a graphic in it and have the window be exactly the correct size of the image. Is there anyway to do this that will work on any browser on any OS???? Thanks David
6
5622
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser window when I open a new window. > > function expand() { > window.moveTo(0,0); > window.resizeTo(screen.availWidth, screen.availHeight); > }
1
1668
by: jdapro | last post by:
Hi - thanks for reading this out there! I'll be quick about it: I've got this row of images (in the end there will be more rows of pics as well). When a user clicks on the image, I want a new window to open with a larger version of the image. I want that new window to be customized to the size of the new larger image. Also, when users go...
3
10008
by: johkar | last post by:
My child window has this script. "temp" is simply the value of the select list which I am passing onchange. I get a permission denied error in IE when executing selectOption. function selectOption(temp){ if(temp == ''){ alert('You have not made a selection. Please make a selection to continue.'); return false; }
4
6377
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database to look a and I am loosing tremendious amounts of time trying to organize it so that I could view it. Regards, Alexandre Brisebois
2
17498
by: daveyand | last post by:
Hey Guys I am able to detect a window resize using the following code: window.onresize = function () { if(document.getElementById("parent_for_video").style.display != "none") { calculate_positions(); //Resize the main div
7
2064
by: Dr J R Stockton | last post by:
I want page <URL:http://www.merlyn.demon.co.uk/js-quick.htmto open, in IE6, IE7, Firefox 2, and wherever else practicable, with the control labelled F.X0 fully visible at the top of the window and the control F.Result (which is just under the textarea) fully visible at the bottom of the window. What's the right, or best, way to do that? ...
0
7468
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
5972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.