Re: Lightweight visual control
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 5 Aug 2007 15:13:42 +0200
You should not attempt to use a windowed control as a graphical wiget such as a bouncing ball or space-invaders sprite. This functionality is best achieved using a lightweight graphical object that is part of a simple retained-mode graphics system.
See Windows Forms Tips and Tricks for several examples of these systems including a good example of animation using GDI+ lightweight objects.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Mike D Sutton" <EDais@xxxxxxxx> wrote in message news:%23lnrOCh0HHA.4476@xxxxxxxxxxxxxxxxxxxxxxx
I'm developing some simple user-drawn graphical controls and looking for the most efficient way of going about it.
Initially I had the default VS control project which derrived from 'UserControl' with all it's baggage. Having a look up the inheritance tree it looks to me that this is designed to be a scrollable control container by default which I did not require, and so inheriting from 'Control' instead worked just fine.
Having a look through the Control class (metadata) it seems that there are a lot of properties which don't really apply to my control though, however going up a level further to 'Component' looses some of the required functionality (namely creating a window, painting and so on.)
Is the standard practice in this case to just use Control, or is there a more appropriate base class to work from?
Cheers,
Mike
.
- Prev by Date: DataGridView column order in Designer
- Next by Date: RE: DataGridView column order in Designer
- Previous by thread: Re: Lightweight visual control
- Next by thread: VC# Express: please suggest a control to generate reports with images in
- Index(es):
Relevant Pages
|