473,386 Members | 1,785 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,386 software developers and data experts.

Form update flicker?

I'm working on an application that uses a MDI interface. Each child form has
a number of text boxes and labels. The interface follows the Outlook
convention that only one child is open at a time, and the current child is
unloaded when a new MDI child form is loaded.

Her's my problem: There is a noticeable flicker in the MDI client area when
the app switches from one form to another. I've tried sending WM_SETREDRAW
messages to the form, but that hasn't worked so far. So, I've got two
questions:

(1) Is there any way, short of SendMessage(), to suspend repaint on a form?

(2) If not, can anyone provide an example of the proper use of
SendMessage(WM_SETREDRAW) to get the job done?

Thanks in advance.

--
Dave Veeneman
Chicago
Nov 16 '05 #1
1 3144
The Win API LockWindowUpdate() seems to work pretty well. Here's how I
implemented it:

#region Declarations

// DLL Imports
[DllImport("user32.dll")]
public static extern bool LockWindowUpdate(IntPtr hWndLock);

#endregion

#region Methods

private void LoadWorkPanel(string newPanelKey)
{
// Suspend redraw
LockWindowUpdate(this.Handle);

// Form loading code...

// Resume redraw
LockWindowUpdate(IntPtr.Zero );
}

#endregion
Nov 16 '05 #2

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

Similar topics

3
by: Sonoman | last post by:
Hello all: What is wrong with my code? I want it to update the new text on the textbox on every iteration of my loop. But instead the textbox updates all info at the end of the loop. I also have...
1
by: Michael | last post by:
Here is my problem: I have a MDI application and when I load my child forms I get alot of flicker. I have tried to implement double buffering : Public Sub New() MyBase.New() 'This call is...
0
by: Deborah V. Gardner | last post by:
I am using Access 2000 and have a form with an image background (the clouds that came with Office). I also have an OnChange event on the Item control. Me.txtLength = 55 - (Len(Me.Item.Text)) ...
1
by: Dave Veeneman | last post by:
I'm working on an application that uses a MDI interface. Each child form has a number of text boxes and labels. The interface follows the Outlook convention that only one child is open at a time,...
3
by: Jesse Aufiero | last post by:
I have an MDI application with two maximized child forms. At any given time only one of the child forms is in the foreground and visible. To alternate between the two child forms, I can type...
6
by: chris.dannemiller | last post by:
I need to be able to move a few form abouts around after a event occurs but when I do this it causes massive flickering is there any way to reduce this?
2
by: AS | last post by:
Hi, I have a windows form with a background image - set through the forms background image property. The form also has panels and icons on top of it. When this form is loading, there's a...
10
by: themightypea | last post by:
Hi, I'm attempting to create a continuos form which allow the user to edit various fields for each item. Unfortunately, the data I need is spread over multiple tables so binding the control to the...
0
by: pianobasher | last post by:
Hello I have a class that's derived from a normal windows Form. I call it BaseContainer. It has a Panel and a built-in method to add another BaseContainer derivative inside that panel. I hoped...
1
by: Mecena | last post by:
Hi all! I have a problem regarding form loading speed. I have forms with many controls and some time ago I've implemented a fader that uses a symbollic millisecond of fade time to buffer the...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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...
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,...

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.