Inherit or usercontrol

  • Thread starter Thread starter Station Media
  • Start date Start date
S

Station Media

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
 
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
 
Station Media said:
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.
 
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).


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
 

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

Back
Top