Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Custom Control issue in design view

Reply
 
Old 03-16-2009   #1 (permalink)
Tom P.


 
 

Custom Control issue in design view

I am trying to make a custom control. The problem I'm having is that
if I inherit from Control I can't get the bloody thing to display
anything. But if I inherit from UserControl I can't hide any of the
properties (namely the size). How do I get the control to display in
design view and still retain control over the properties?

Thanks in advance,
Tom P.

My System SpecsSystem Spec
Old 03-16-2009   #2 (permalink)
Dawid Rutyna


 
 

Re: Custom Control issue in design view

>I am trying to make a custom control. The problem I'm having is that
Quote:

> if I inherit from Control I can't get the bloody thing to display
> anything. But if I inherit from UserControl I can't hide any of the
> properties (namely the size). How do I get the control to display in
> design view and still retain control over the properties?
(...)

You will find solution for both cases (showing, hiding) here:
http://www.c-sharpcorner.com/UploadF...blePicBox.aspx

Dawid Rutyna


My System SpecsSystem Spec
Old 03-16-2009   #3 (permalink)
Dawid Rutyna


 
 

Re: Custom Control issue in design view

>I am trying to make a custom control. The problem I'm having is that
Quote:

> if I inherit from Control I can't get the bloody thing to display
> anything.
"the Control class defines the bounds of a control (its position and size),
although it does not implement painting."
So you have to do it yourself, nice example:
http://www.codeproject.com/KB/tabs/flattabcontrol.aspx

Dawid Rutyna


My System SpecsSystem Spec
Old 03-16-2009   #4 (permalink)
Dawid Rutyna


 
 

Re: Custom Control issue in design view

Maybe at the beginning try to paint this:
http://en.csharp-online.net/Architec...Custom_Control

Dawid Rutyna


My System SpecsSystem Spec
Old 03-17-2009   #5 (permalink)
Tom P.


 
 

Re: Custom Control issue in design view

On Mar 16, 3:27*pm, "Tom P." <padilla.he...@xxxxxx> wrote:
Quote:

> I am trying to make a custom control. The problem I'm having is that
> if I inherit from Control I can't get the bloody thing to display
> anything. But if I inherit from UserControl I can't hide any of the
> properties (namely the size). How do I get the control to display in
> design view and still retain control over the properties?
>
> Thanks in advance,
> Tom P.
OK, I figured out the issue. The Control object doesn't display itself
in the IDE unless you place it in a control or form. I guess this is
so it doesn't have to execute any paint code or other stuff that might
blow-up at design time.

If you want to see a control inherited from Control, place it in a
Form.

Tom P.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Control panel view issue Vista performance & maintenance
Control panel view issue Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46