How do you make a .net control

  • Thread starter Thread starter Simon Harvey
  • Start date Start date
S

Simon Harvey

Hi,

Is it hard to make a .net control? You know, like say a graphing component.
Do you have to use lots of primitive graphic calls to the GDI in order to
make the control or is there some easier way.

Thanks everyone

Simon
 
You can use GDI+, which is basically a convenient wrapper around GDI. But
you'll find it's considerably slower with intensive painting operations. You
could try using GDI+, if you find that it's fast enough for your needs, you
can stick with it.. otherwise, switching to GDI once you've written GDI+
code shouldn't be particularly hard.
 
You can make a control that just has a button on it with no GDI calls.
(Just create a new control project, drag & drop a button onto it)

To do graphing itself may be a bit of work. In general, you'll find
that graphics isn't too bad with GDI+ (System.Drawing namespace). But
it depends on how many different graphs, styles, and all of that you
want to support. Trying to recreate all of the Excel graphing
functionality would be a lot of work, obviously.

There are graphing components out there already (google: c# graph).

mike
 
Back
Top