473,396 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Inherit or usercontrol

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
3 1164
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
"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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mohammad-Reza | last post by:
I wrote a component using class library wizard. In my component i want to in order to RightToLeft property do some works. I can find out if user set this property to Yes or No, But if He/She set it...
4
by: Rodrigo Ferreira | last post by:
How can i inherit from System.Windows.Forms.UserControl and LicFileLicenseProvider In the same class?
8
by: Issac | last post by:
Hi, I created an Inherit UserControl which inherits textbox with additional property say 'Type'. I used in my forms and everything works fine. But afterward, I want to remove (or rename) such...
5
by: Jim Hubbard | last post by:
I have created a simple usercontrol that adds functionality to the webbrowser control (let's call it ctrl1). I would like to add it to another usercontrol I am creating (let's call it ctrl2), but...
3
by: Guillaume Hanique | last post by:
Hi, I feel very stupid. I simply want to derive a control from system.web.ui.webcontrols.button and use that on my webform, but I just can't get it done. Can anyone tell me how to do that? I...
2
by: Joe | last post by:
Is it possible to inherit from a UserControl? If I try my user control class is not recognized. Thanks, Joe
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.