Slow Rendering on Windows Forms when I am using graphics as backgr

G

Guest

Hello,

I am trying to build a KIOSK application, where all windows forms are filled
with graphics images and a lot of buttons.

The major bproblem is that when the application is running and the forms are
ready to display on the screen I see a lot of cuts... for example when I show
a form that has a background image (800x600) and about 20 buttons on it,
which each of the button has a background image, the render on the screen is
not the recomended....!

Is there any technique that I could do the rendering smoother and faster???

Many thanks
George Barbagiannis

P.S. Computer 2.4G 1GB 128MB VGA
 
J

John Price

You can try this...

This is what I use in several applications.

[DllImport("user32", EntryPoint = "LockWindowUpdate", ExactSpelling = true,
CharSet = CharSet.Ansi, SetLastError = true)]

private static extern int NativeLockWindowUpdate(int hWnd);

Then call NativeLockWindowUpdate(me.hWnd) at the start of the screen
updating, say at the top of form load,

then call NativeLockWindowUpdate(0) after all updates have been drawn, say
at the end of activate.



Hope this helps...



More details at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_4i5h.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top