473,387 Members | 2,436 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,387 software developers and data experts.

stop the painting of a form

Hello,
I have a problem with a form loading a repainting. Because the form
uses an office 2000 styles, when it paints it causes a lot of flickering. The
standard advice is to set the following
SetStyle(ControlStyles.DoubleBuffer, True)
SetStyle(ControlStyles.AllPaintingInWmPaint, True)

However this seems to make no difference. When the form loads it originall
appears in the old grey colour of classic windows and then quickly changes to
the new blue of
Office 2000 styles. This causes a lot of flickering, any ideas to reduce or
possible remove this so that the form appears fully formed. The form is an
inherited form so this may be another issue.
Regards
Robert
Jul 21 '06 #1
2 2860
I have a problem with a form loading a repainting. Because the form
uses an office 2000 styles, when it paints it causes a lot of flickering. The
standard advice is to set the following
SetStyle(ControlStyles.DoubleBuffer, True)
SetStyle(ControlStyles.AllPaintingInWmPaint, True)

However this seems to make no difference. When the form loads it originall
appears in the old grey colour of classic windows and then quickly changes to
the new blue of
Office 2000 styles. This causes a lot of flickering, any ideas to reduce or
possible remove this so that the form appears fully formed. The form is an
inherited form so this may be another issue.
If the problem is confined to the form load event, then do Me.Hide at the
top and Me.Show at the bottom of the load event handler. This works for me
in all cases where the first draw of a form is clunky.
Jul 21 '06 #2
Hello AMercer,

YIKES.
Try using LockWindowUpdate() at the beginning and end of the paint cycle.

-Boo
>I have a problem with a form loading a repainting. Because the form
uses an office 2000 styles, when it paints it causes a lot of
flickering. The
standard advice is to set the following
SetStyle(ControlStyles.DoubleBuffer, True)
SetStyle(ControlStyles.AllPaintingInWmPaint, True)
However this seems to make no difference. When the form loads it
originall appears in the old grey colour of classic windows and then
quickly changes to the new blue of Office 2000 styles. This causes a
lot of flickering, any ideas to reduce or possible remove this so
that the form appears fully formed. The form is an inherited form so
this may be another issue.
If the problem is confined to the form load event, then do Me.Hide at
the top and Me.Show at the bottom of the load event handler. This
works for me in all cases where the first draw of a form is clunky.

Jul 21 '06 #3

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

Similar topics

5
by: Alien | last post by:
I have a hex editor-type class that extends UserControl and paints its data to a PictureBox. Basically the problem is that repainting it takes usually between 60 and 80ms, which may seem pretty...
4
by: Dafü | last post by:
Hello! I have an application that paint graphics in VB.NET. Each graphic is painted after a long calculation process. My problem is when another windows pass over my graphics or I resize the...
7
by: adh | last post by:
How do you temporarly stop the screen painting in VB.NET (alla "echo off" in vb6)? I have a modal form that when closing keeps partial showing. Thanks ADH
0
by: J Rico | last post by:
Hi, I'm having a problem with some code we're writting. Our customer doesn't like windows forms style painting, so their designer has created a skin and we have added it. There are many ways in...
3
by: Jon Vaughan | last post by:
I have a form that im using to draw buttons onto, a click on the buttons will cause the text on the buttons to change and some buttons will be hidden , so im looking to stop the redraw on the form...
0
by: Halimaji Nijazi | last post by:
Hi everybody On my form I have a procedure, which moves some textboxes and buttons... then it makes some validations... after this it moves the objects again. So far so good... But now I have...
2
by: Halimaji Nijazi | last post by:
Hi everybody On my form I have a procedure, which moves some textboxes and buttons... then it makes some validations... after this it moves the objects again. So far so good... But now I have...
4
by: Marina Levit | last post by:
I am trying to do some processing on a background thread while keeping the UI painting. However, this is a generic server side call routine - and it needs to block until the server side call...
5
by: lazyvlad | last post by:
Hi, I'm writing here because this issue is becoming more annoying with each day it passes. So I have a form, a dataset with a few table adapters (3 to be precise) and a datagridview.The datagridview...
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:
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.