Click here to Skip to main content
15,922,427 members
Home / Discussions / C#
   

C#

 
GeneralRe: Inheriting System.Windows.Forms.Button Pin
FriendOfAsherah8-Nov-07 8:51
FriendOfAsherah8-Nov-07 8:51 
QuestionDatagrid Iteration Pin
Rocky#5-Aug-06 21:04
Rocky#5-Aug-06 21:04 
QuestionDotfuscator and GAC Pin
Ranjan Banerji5-Aug-06 17:15
Ranjan Banerji5-Aug-06 17:15 
AnswerRe: Dotfuscator and GAC Pin
Ranjan Banerji5-Aug-06 17:23
Ranjan Banerji5-Aug-06 17:23 
AnswerRe: Dotfuscator and GAC Pin
Mike Dimmick5-Aug-06 17:31
Mike Dimmick5-Aug-06 17:31 
Questionsetup package Pin
md_refay5-Aug-06 11:14
md_refay5-Aug-06 11:14 
AnswerRe: setup package Pin
Stanciu Vlad5-Aug-06 22:19
Stanciu Vlad5-Aug-06 22:19 
QuestionFlashing statusbar button Pin
Maksymus0075-Aug-06 11:13
Maksymus0075-Aug-06 11:13 
AnswerRe: Flashing statusbar button Pin
Thomas Stockwell7-Aug-06 12:43
professionalThomas Stockwell7-Aug-06 12:43 
Questionpublic variable Pin
md_refay5-Aug-06 11:11
md_refay5-Aug-06 11:11 
AnswerRe: public variable Pin
Vega025-Aug-06 12:03
Vega025-Aug-06 12:03 
Questionhow can i create a License for my applications Pin
keroed_edmond5-Aug-06 9:40
keroed_edmond5-Aug-06 9:40 
AnswerRe: how can i create a License for my applications Pin
Rob Graham5-Aug-06 9:54
Rob Graham5-Aug-06 9:54 
QuestionQuickTime movie frame extract with C# Pin
Phoen255-Aug-06 9:02
Phoen255-Aug-06 9:02 
AnswerRe: QuickTime movie frame extract with C# Pin
eggie55-Aug-06 20:46
eggie55-Aug-06 20:46 
QuestionC# Delete database records without SQL text? Pin
DannyAdler5-Aug-06 8:19
DannyAdler5-Aug-06 8:19 
AnswerRe: C# Delete database records without SQL text? Pin
Rob Graham5-Aug-06 9:18
Rob Graham5-Aug-06 9:18 
QuestionOverriding Inheritance??? Pin
Shy Agam5-Aug-06 5:27
Shy Agam5-Aug-06 5:27 
Hello fellow programmers,

I have something in mind which, as far as my knowledge goes, cannot be done.
But I'm writing here to ask for a solution...

I'll start with explaining a class I wrote, named ShapedForm...
ShapedForm inherits from System.Windows.Forms.Form.
It has a built in functionallity to receive a Bitmap object, and change the form's region according to the drawing in the Bitmap, leaving out "transparent pixels".
I've also added a mouse-drag ability, as it's impossible to move the form without a title-bar.

So today I've started coding a new project, where I wanted a shaped button!
My idea was to inherit System.Windows.Forms.Control which, as you all know, is the base class for many controls, and add the above functionallities to it.
The problem comes here...
Is there any way to force the derived classes (i.e. Form, Button, Panel, etc.) to inherit from my ShapedControl instead of the original Control class?
Kind of like overriding an inheritance or something like that...

Again, as far as I know, it cannot be done...
So if you have an alternative method in mind, please share it with me. Smile | :)

Thanks in advance,
Shy.
AnswerRe: Overriding Inheritance??? Pin
Colin Angus Mackay5-Aug-06 5:53
Colin Angus Mackay5-Aug-06 5:53 
GeneralRe: Overriding Inheritance??? Pin
Shy Agam5-Aug-06 6:49
Shy Agam5-Aug-06 6:49 
QuestionListView LargeIcon problem Pin
loneferret5-Aug-06 3:43
loneferret5-Aug-06 3:43 
AnswerRe: ListView LargeIcon problem Pin
mav.northwind5-Aug-06 10:37
mav.northwind5-Aug-06 10:37 
GeneralRe: ListView LargeIcon problem Pin
loneferret7-Aug-06 1:42
loneferret7-Aug-06 1:42 
GeneralRe: ListView LargeIcon problem Pin
mav.northwind7-Aug-06 6:37
mav.northwind7-Aug-06 6:37 
GeneralRe: ListView LargeIcon problem Pin
mav.northwind11-Aug-06 21:40
mav.northwind11-Aug-06 21:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.