By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

Inherit or usercontrol

P: n/a
Hi everybody,

I need to create a custom button for all our internal applications, and i
would like to know what is the best for this type of control(button), is it
to inherit standard button or create a full new one with usercontrol (using
GDI+) ?
Which one will be the fatest or is it the same speed to display button on
screen (form with more than 100 buttons) ?

thank you
jean-claude
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jean,

Most probably is every control that you inherit from another slower.

Everywhere when there is GDI+ involved it will be extra slow.
(By instance round ones).

Cor
Nov 21 '05 #2

P: n/a
"Station Media" <go****@easycolorthemes.com> wrote in message
news:5c**************************@posting.google.c om...
I need to create a custom button for all our internal applications,
and i would like to know what is the best for this type of control
(button), is it to inherit standard button or create a full new one
with usercontrol (using GDI+) ?
I don't know /much/ about GDI+, but I suspect that if you go down
that road, then you have to do absolutely /everything/, including
updating your control to incorporate any changes that Our Friends
in Redmond might want to introduce into future "Button" controls
(you can guarantee your Users will want all this new "stuff").

If you inherit from the standard button, I /think/ you can still take
charge of the drawing of that button (read up on OwnerDrawn
Controls - I've used this with TabPages, if not with Buttons).
Which one will be the fastest or is it the same speed to display
button on screen
The speed probably won't be that much different, once your control
has been loaded and J-I-T-compiled (more GDI+ code => longer
load time).
(form with more than 100 buttons) ?
You have a form with 100 buttons???
What are you writing? The next version of MineSweeper? ;-)

HTH,
Phill W.

thank you
jean-claude

Nov 21 '05 #3

P: n/a
> The speed probably won't be that much different, once your control
has been loaded and J-I-T-compiled (more GDI+ code => longer
load time).
(form with more than 100 buttons) ?


You have a form with 100 buttons???
What are you writing? The next version of MineSweeper? ;-)

HTH,
Phill W.

Thank you for answer, no i'm not writing a minesweeper :-) just a user
interface which need many buttons on screen.

So to resume you say i should use original button and inherit it ? (i
need to paint new button style on each button, i think to use GDI+).

jean-claude
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.