473,383 Members | 1,725 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,383 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 3143
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...

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.