Click here to Skip to main content
15,851,242 members
Home / Discussions / C#
   

C#

 
GeneralRe: Executing code for more than 1 statements Pin
Melanius31-Dec-03 7:46
Melanius31-Dec-03 7:46 
GeneralGuid in DataTable Pin
Mazdak30-Dec-03 10:30
Mazdak30-Dec-03 10:30 
GeneralRe: Guid in DataTable Pin
Heath Stewart30-Dec-03 12:23
protectorHeath Stewart30-Dec-03 12:23 
GeneralRe: Guid in DataTable Pin
Mazdak30-Dec-03 20:30
Mazdak30-Dec-03 20:30 
GeneralRe: Guid in DataTable Pin
Heath Stewart30-Dec-03 20:39
protectorHeath Stewart30-Dec-03 20:39 
GeneralRe: Guid in DataTable Pin
Mazdak30-Dec-03 20:57
Mazdak30-Dec-03 20:57 
GeneralForm flashes beneath an OpenFileDialog or 2nd Form Pin
flipdoubt30-Dec-03 5:15
flipdoubt30-Dec-03 5:15 
GeneralRe: Form flashes beneath an OpenFileDialog or 2nd Form Pin
Heath Stewart30-Dec-03 6:58
protectorHeath Stewart30-Dec-03 6:58 
SuspendLayout and ResumeLayout are really only useful when initializing controls. Once they're initialized, it's pointless to use them.

As for the problem, do you notice the flickering when passing another window over your application (a window from another application)? If so, painting isn't the error exactly. Whatever occurs in your app in this case when you close the form is eating up enough CPU cycles - or blocking the main UI thread completely - to cause slow repainting of invalidated regions.

If the behavior is the same whether you pass one of your windows, or a window from another application over yours (or minimize -> restore, whatever to invalidate your form), then you might have to consider overriding several of the more offensive controls and enable double-buffered painting. See the Control.SetStyle method and ControlStyles enumeration documentation for details.

If many of these controls are already custom controls that you've written, using a double-buffered approach to painting (if you haven't already) will help, but you should also be mindful of the invalidated region when handling OnPaint (its better to override OnEventName methods when possible, as opposed to handling the events in a child class) and only repaint the invalidated regions (again, if you haven't already).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralValue in Database Pin
Mazdak30-Dec-03 2:17
Mazdak30-Dec-03 2:17 
GeneralRe: Value in Database Pin
Heath Stewart30-Dec-03 6:51
protectorHeath Stewart30-Dec-03 6:51 
GeneralRe: Value in Database Pin
Mazdak30-Dec-03 7:32
Mazdak30-Dec-03 7:32 
GeneralRe: Value in Database Pin
Heath Stewart30-Dec-03 8:36
protectorHeath Stewart30-Dec-03 8:36 
GeneralRe: Value in Database Pin
Mazdak30-Dec-03 10:30
Mazdak30-Dec-03 10:30 
GeneralCreating an XML File Pin
deanoA29-Dec-03 23:08
deanoA29-Dec-03 23:08 
GeneralRe: Creating an XML File Pin
Colin Angus Mackay29-Dec-03 23:36
Colin Angus Mackay29-Dec-03 23:36 
GeneralRe: Creating an XML File Pin
Manster31-Dec-03 4:31
Manster31-Dec-03 4:31 
QuestionHow should I call an exe file using C# Pin
Saqib Razzaq29-Dec-03 21:25
Saqib Razzaq29-Dec-03 21:25 
AnswerRe: How should I call an exe file using C# Pin
Yaron K.29-Dec-03 21:38
Yaron K.29-Dec-03 21:38 
GeneralRe: How should I call an exe file using C# Pin
Saqib Razzaq29-Dec-03 21:49
Saqib Razzaq29-Dec-03 21:49 
GeneralRe: How should I call an exe file using C# Pin
Juergen Posny29-Dec-03 23:09
Juergen Posny29-Dec-03 23:09 
GeneralRe: How should I call an exe file using C# Pin
Saqib Razzaq29-Dec-03 23:30
Saqib Razzaq29-Dec-03 23:30 
GeneralExpand/Collapse feature in c# Pin
pc_2k1129-Dec-03 20:35
pc_2k1129-Dec-03 20:35 
GeneralRe: Expand/Collapse feature in c# Pin
Heath Stewart30-Dec-03 6:40
protectorHeath Stewart30-Dec-03 6:40 
GeneralChanging the paper size at run time Pin
Yaron K.29-Dec-03 20:32
Yaron K.29-Dec-03 20:32 
GeneralRe: Changing the paper size at run time Pin
Mazdak30-Dec-03 0:42
Mazdak30-Dec-03 0:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.