473,770 Members | 4,055 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows form flicker with background image

AS
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 lot of flicker in the screen.
I tried reducing this by enabling double buffering -
//Constructor
this.SetStyle(C ontrolStyles.Do ubleBuffer,true );
this.SetStyle(C ontrolStyles.Us erPaint ,true);
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int,true);
Even after this there's no change. How do I solve this?
The background image is a .png image and its size is 60k.

Mar 22 '06 #1
2 11167
Have you tried overriding the OnPaintBackgrou nd method, and leaving it
blank so that the base isn't called? From experience I've found that
this helps with almost all flicker problems. It has its side effects
though.

Also the double buffer that is built in doesn't always work as well as
having your own buffer that you write to. Again, just my own experience.

Mar 22 '06 #2
AS wrote:
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 lot of flicker in the screen.
I tried reducing this by enabling double buffering -
//Constructor
this.SetStyle(C ontrolStyles.Do ubleBuffer,true );
this.SetStyle(C ontrolStyles.Us erPaint ,true);
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int,true);
Even after this there's no change. How do I solve this?
The background image is a .png image and its size is 60k.

I found I was getting some flicker recently with a background image -
the form flashed black when first loaded.

Turns out I had set a Transparency Key value (had been playing around
with values for it out of curiosity) and removing that sorted out my
problem.

Gary
Mar 22 '06 #3

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

Similar topics

8
3774
by: Ron Holmes | last post by:
I want to place a background image on a windows form. Is there a way to prevent the image from Tiling without using an image box resized to the size of the form? I am using Visual Studio 2003 .NET. This is an easy thing to do in VB6.
0
2137
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)) Everthing works just fine. I then added a tab control. Now, whenever I add/change/delete data in the Item control, the screen flickers. If I take out the event, there is no flicker. If I use the event and remove the image, there is no flicker. If...
5
3482
by: VMI | last post by:
I have a BMP image (the form is also in PDF) that contains a scanned copy of a paper form that we need to fill out. Is it possible to use this image in my application so that the application can print out the form and the data that the user entered? For example, the user loads the application and a normal Windows Form asks for the user's name. When the user enters the name and clicks on the "Print" button, I'd like to print the form in the...
9
2823
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am facing. Please please help me to solve this as soon as possible. So here we go ... I am not able to take the screen shot of the windows form based "Smart
4
2193
by: steve | last post by:
ok, ok...obj.suspendlayout/resumelayout. but it isn't helping and i need advice. i have a custom progress bar made from a label control. i manually paint it when the progress changes. i'm drawing a filled, rounded rectangle twice w/n the label...once to give a light background color, the second time is the show the progress. the third paint operation is to draw the progress info text w/n the label. everything works just fine, but when...
3
5112
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 Ctrl-Tab. This results in a seamless toggling between the two forms - no flickering. However, when I attempt to use my own code to toggle between the two forms (the user clicks a menu Window>>Child1 or Window>>Child2 to fire this code), I get a...
0
1480
by: Blue Apricot | last post by:
I think this is straighforward enough so I don't need sample code, but I will make an example if someone doesn't understand. BACKGROUND: We have built a "skinnable" interface, which uses rollover effects using simple javascript. Before these images were defined in the HTML (IMG src and TD Backgrounds), and it worked fine. You moused over a button, for instance, and it changed immediately. Now we have switched everything to external...
3
5669
by: seamlyne | last post by:
The first method I ever used for multiple state buttons was to create a graphic for each button for each state: AboutUs_on, AbooutUs_over, AboutUs_out, etc. That works great when there are just a few buttons. I'm creating interfaces now with many more buttons than "just a few". I solved the maintenance problem by having generic button images, one for each state, and having them be background images for text containers, DIVs in this...
4
9625
by: huntingseasonson | last post by:
Hi, I have set up the following page http://gertrudischale.com/cgi/ viewart.pl?lang=en&i=22 to scroll in the same direction one moves the mouse. This works fine -except in IE- where the image tends to flicker when the scrolling takes place. Is there an alternative way to achieve the scrolling with out the causing the flicker? The code is as follows:
0
9592
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
9425
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
10230
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...
0
10058
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10004
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,...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7416
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...
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.