Ok. I'll reply in that thread.
"DiamondDave" <DiamondDave@discussions.microsoft.com> wrote in message
news:C0B3614A-86D3-4889-9C48-31ABCDBCA944@microsoft.com...
> Hi Tim
>
> That was exactly what I needed! Thankyou
>
> You wouldn't be interested in looking at another thread I have going
called
> "Form component like common Openfiledialog"?
>
> Thanks again
> Dave
>
> "Tim Wilson" wrote:
>
> > A UserControl is a composite control. This means that the control is
usually
> > exposed as other controls simply grouped together. So the reason that
you
> > have a designer view of the UserControl is to allow you to easily drag
and
> > drop controls from the ToolBox. In your case, you just want to modify
the
> > default behavior of a single control. So the best approach would be to
just
> > inherit directly from this control. The main benefit is that all the
events
> > and properties of the Button will be directly exposed through your
custom
> > control since they are inherited. The quick start tutorial, linked
below,
> > has some useful information on getting started building custom controls.
> >
http://samples.gotdotnet.com/quickstart/winforms/doc/WinFormsCreatingControls.aspx > >
> > --
> > Tim Wilson
> > ..Net Compact Framework MVP
> >
> > "DiamondDave" <DiamondDave@discussions.microsoft.com> wrote in message
> > news:3734BC9F-3504-4BBA-B828-2CEB42A6519D@microsoft.com...
> > > Hi Tim
> > >
> > > I changed the class to be derived from Button instead of UserControl,
but
> > > there are obviously some other things that need to be changed.
Starting
> > with
> > > a UserControl doesn't seem the best way, but the only other UI option
> > seems
> > > to be a Form, so now I'm confussed! Any examples you know of that
would
> > > explain the procedure to a dumbass newbie would be appreciated.
> > >
> > > Thanks
> > > Dave
> > >
> > >
> > > "Tim Wilson" wrote:
> > >
> > > > So you just want to change the default color of a Button but allow
this
> > > > control to be reusable from the ToolBox? If so, then you should
derive
> > your
> > > > control directly from the Button class and not from UserControl.
> > > >
> > > > --
> > > > Tim Wilson
> > > > ..Net Compact Framework MVP
> > > >
> > > > "DiamondDave" <DiamondDave@discussions.microsoft.com> wrote in
message
> > > > news:93158DD8-A2CB-46AC-90E6-D75BFE04E7C3@microsoft.com...
> > > > > Hi There
> > > > >
> > > > > Another dumb newbie question, sorry. I want to be able to create
> > > > > applications by dragging my own version of controls onto a Form.
The
> > > > reason
> > > > > for making say a button as a user control, is I want to button
color
> > to be
> > > > a
> > > > > specific color and not the default color. When I drag the
Usercontrol
> > onto
> > > > > the form it all looks fine, but when it executes, the onclick
can't be
> > set
> > > > on
> > > > > the usercontrol. I'm guessing the OnClick on the button needs to
send
> > an
> > > > > event to theUserControl so I can get at the onclick event in the
> > designer.
> > > > >
> > > > > Is there a better way to do this?
> > > > >
> > > > > If this is the best way to do this, do I need to propergate all
the
> > > > possible
> > > > > actions of the control up to the UserControl?
> > > > >
> > > > > Thanks
> > > > > Dave
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >