Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

c# gui question

Status
Not open for further replies.

esdee

Programmer
Apr 12, 2001
143
US
hi! i have a C# GUI application and on the main form (size of about 800x600) i have a picture as a background (through the form properites) - but it makes redrawing the form veeeery slow ! any advice how i can make it faster?
thanx
 
Add the picture file as Embedded Resource and should not be "veeeery slow"!.
Do the following:
In the Solution Explorer, locate the picture file (that you want to use as background) from the the projects items. If that file is not there add it as an existing item, let refer it by "file1.bmp".
On the Property window of the "file1.bmp" entry , set Build Action->Embedded Resource.
-obislavu-
 
thanx for the tip, obislavu, i tried it, but can't say there is much improvement

------------------------
dev at viewmoresoft.com
tools for your database
 
You might try reducing the number of colors in the picture.

Sometimes a smaller picture that gets tiled can be faster to display, as well.

Also, what format is the picture? If you were to use an uncompressed bitmap or gif (vs. a Jpeg or Png file) it should be pretty fast.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
hmmm... im using jpeg, but should it matter really? i mean - on runtime it should be decompresed anyway...
however i changed the resolution, and maybe there really is a slight improvement

------------------------
dev at viewmoresoft.com
tools for your database
 
decompressed == CPU cycles taken away from your app.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
you can also use the DirectX Namespace to implement a picture in the background.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top