the PROPER technique for image-intensive application development

zenimpulse

New member
Joined
Apr 5, 2003
Messages
2
howdy all.

/*
i have an app that (ideally) will use a slew of custom controls, either explicitly drawn by myself through GDI+, or by using pre-made controls not native to the VS.NET IDE.

The goal is to have an app that does NOT look like a traditional win app, but has the same functionality. My concern is performance penalties by using images so much.

Im sure there are better ways to go about doing this, so Im all ears for any suggestions!
*/


Currently for example, I have 2 picture boxes to serve as the "Minimize" and "Maximize" buttons. Each button has 2 images- one for normal state, and another for MouseEnter.

I added the files to the project, then manually set the pictureBoxs image property. Based on mouse events, the image property changes to reflect the image desired.

does this make sense? :) Im going to have these same "buttons" on at least 5 other forms, and this is in addition to many more "buttons" yet to be implemented.

(this is for a tablet pc, so we are trying to make this as gui-friendly as possible)
 
(You probably saw this coming)
Without knowing just how many graphics you have and how much custom drawing youre doing, tis hard to answer. Plus a tablet PC is going to be foreign to most people since theyre not very widespread as of yet.

I can make a general statement that used to be true (not sure if it is in .NET). It used to be that PictureBoxs were very handy things - exposing nice events and such. But when it came to graphics performance, you paid a price.

While it may be a lot more code, you might try implementing your Min/Max buttons as pure graphics - handled through the Paint event. It means using the Forms MouseMove events to determine where youre at and if youre inside the area that looks like a Min/Max button and draw it accordingly.

Depending on many graphics you have, you may want to convert none, some, or all of your PictureBoxs to this type of custom drawn stuff. Definitely more code, but it may pay off in performance.

-Ner
 
thanks for the reply, Nerseus.

I am going to be drawing most of the controls myself, as well as the form background. i was more concerned with other parts of the app that would look much better w/ something rendered in photoshop as opposed to GDI+.

Surely there must be a conventional approach to handling this kinda problem. Something along the lines of CSS for winforms!


Any tips concerning the tablet pc aspect? Ive already done a ton of research/feedback concerning usability. Most of the controls are going to be larger than normal to accomodate the pen interface. (Thats where the nice pics come in)


thanks again for the help :)
 
Back
Top