473,800 Members | 2,614 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Painting form (flickering)

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 the problem, that the form flickes every
time I move an object.

Overriding onpaint, onbackgroundpai nt and refresh won't help, because after
moving the object the last time i have to call mybase.refresh and release
the event calling the mybase-events... Doing this let the form flickers
again. So I see for a short time the movements I have made...

So my question now is: How can i completely disable the painting of the
form, and when I enable it and refresh the form, it should only show the
current objects whithout "history".

Thanks for your help

Regards

Nijazi Halimaji

Jan 16 '07 #1
2 1620
SuspendLayout()

If you look at the InitializeCompo nent() method of any form, you can see
the proper use of it.

Tom

Halimaji Nijazi wrote:
>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 the problem, that the form flickes every
time I move an object.

Overriding onpaint, onbackgroundpai nt and refresh won't help, because after
moving the object the last time i have to call mybase.refresh and release
the event calling the mybase-events... Doing this let the form flickers
again. So I see for a short time the movements I have made...

So my question now is: How can i completely disable the painting of the
form, and when I enable it and refresh the form, it should only show the
current objects whithout "history".

Thanks for your help

Regards

Nijazi Halimaji


Jan 16 '07 #2
Halimaji Nijazi wrote:
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 the problem, that the form flickes every
time I move an object.
I've never tried it, but how about the Forms "DoubleBuffered " property?
Please post back your findings for all to share.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Jan 16 '07 #3

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

Similar topics

5
15131
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 fast but is not good enough when you have to repaint very frequently. For example, when you scroll the control or select blocks of text quickly. I have it paint its graphics to an offscreen Graphics instance, which I then transfer to the...
1
5218
by: Terry | last post by:
I've seen several posts from people who have seen this flashing in TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a splitter with a TreeView and I do not get the flickering with it. I created a new Form based Windows app. Added a TreeView (dock left), then a splitter and a property grid on the right (dock fill). For this test, I added a panel and button at the...
1
2121
by: RickN | last post by:
I have a form loaded with a full screen form image. I've overlayed a number of controls for filling in the form. When the form opens, I can watch as each control loads (flickering). It also does the same thing each time the form scrolls. What is the best strategy for getting rid of the flickering? Thanks, Rick
2
1041
by: Strath-Clyde | last post by:
Well, its advanced to me anyway. Included is the link to download the sample project and exe (Translucent_Test.exe) (too large to upload here - ~ 700k) Run the exe to see the flickering problems. 1) The Side Nav Window will close and open with a mouse click - works fine. 2) The Top and Bottom Button (with the little arrow) scroll the buttons in this window vertically - too much flickering.
5
3762
by: marfi95 | last post by:
I am having to resort to Mick's methods when it comes to hiding/showing tabpages of my tab control since .NET doesn't work correct. I think I have it finally workign the way I need, but because I can show/hide up to 10 tabs, there is a lot of repainting/flickering going on and looks really bad with everything flashing all over the place. Is there a way to turn off the painting until all the tab stuff is executed and then do 1 refresh ? ...
2
2894
by: Robert Smith | last post by:
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...
8
6388
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me any feasible solution, i need to use a checked listbox which also has same flickering problem on resize. Thanks & Regards
0
1009
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 the problem, that the form flickes every time I move an object. Overriding onpaint, onbackgroundpaint and refresh won't help, because after moving the object the last time i have to call mybase.refresh and release
4
1872
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 completes. So the idea is, a server side call begins, it gets spun off on another thread to keep the UI painting - but, the code flow cannot return to the caller until the server side call completes, because the caller expects the data. The only way...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10507
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.