By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Form Flicker

P: n/a
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 required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

' Stop the flicker
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
End Sub

but it did not work.

Does anyone have any suggestions?

Mike
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Michael,
My understanding is you need to call UpdateStyles after you call SetStyle.
Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

' Stop the flicker
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True) Me.UpdateStyles() End Sub
Do you child forms override the OnPaint method or have controls? If they
have controls, I do not believe the above will help, as each control still
needs to paint itself.

Hope this helps
Jay
"Michael" <mi**************@sympatico.ca> wrote in message
news:rP*******************@news20.bellglobal.com.. . 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 required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

' Stop the flicker
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
End Sub

but it did not work.

Does anyone have any suggestions?

Mike

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.