zenimpulse Posted September 23, 2003 Posted September 23, 2003 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. I'm sure there are better ways to go about doing this, so I'm 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 pictureBox's image property. Based on mouse events, the image property changes to reflect the image desired. does this make sense? :) I'm 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) Quote
*Experts* Nerseus Posted September 24, 2003 *Experts* Posted September 24, 2003 (You probably saw this coming) Without knowing just how many graphics you have and how much custom drawing you're doing, ti's hard to answer. Plus a tablet PC is going to be foreign to most people since they're 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 PictureBox's 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 Form's MouseMove events to determine where you're at and if you're 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 PictureBox's to this type of custom drawn stuff. Definitely more code, but it may pay off in performance. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
zenimpulse Posted September 25, 2003 Author Posted September 25, 2003 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? I've 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 :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.