Help

Discussion in 'MCSD' started by Guest, Nov 8, 2003.

  1. Guest

    Guest Guest

    I created a user control inheriting from UserControl
    class. My user control has only one constituent control -
    a button in it. I tried to alter the appearence of the
    button. I wrote a new method which handles the contituent
    control's Paint event. When I run this code, I am unable
    to see the changes to the button's appearence clearly.

    However when I use the same code with a control that I
    inherited from System.windows.forms.button, by overriding
    the OnPaint method, it works.

    Can someone explain?

    Also,I want to know, if it is possible to change the
    appearence of a constituent control by overriding the
    OnPaint method. It does not give me any errors when I try
    that. But the books say, that it cannot be done and that a
    new method must be written to handle the constituent
    control's paint method.

    Thanks
     
    Guest, Nov 8, 2003
    #1
    1. Advertising

  2. Guest

    Guest Guest

    You'd find better help at one of the *.aspnet.* newsgroups.

    <> wrote in message
    news:011a01c3a627$b9769e80$...
    > I created a user control inheriting from UserControl
    > class. My user control has only one constituent control -
    > a button in it. I tried to alter the appearence of the
    > button. I wrote a new method which handles the contituent
    > control's Paint event. When I run this code, I am unable
    > to see the changes to the button's appearence clearly.
    >
    > However when I use the same code with a control that I
    > inherited from System.windows.forms.button, by overriding
    > the OnPaint method, it works.
    >
    > Can someone explain?
    >
    > Also,I want to know, if it is possible to change the
    > appearence of a constituent control by overriding the
    > OnPaint method. It does not give me any errors when I try
    > that. But the books say, that it cannot be done and that a
    > new method must be written to handle the constituent
    > control's paint method.
    >
    > Thanks
    >
     
    Guest, Nov 8, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jacqueline

    help help help

    jacqueline, Jun 29, 2003, in forum: Computer Support
    Replies:
    16
    Views:
    935
    Slumpy
    Jun 30, 2003
  2. Cam

    HELP HELP HELP

    Cam, Aug 7, 2003, in forum: Computer Support
    Replies:
    3
    Views:
    454
    Brian H¹©
    Aug 7, 2003
  3. Tony Bowring
    Replies:
    8
    Views:
    606
    Patrick
    Nov 10, 2003
  4. Tony Bowring
    Replies:
    0
    Views:
    451
    Tony Bowring
    Nov 10, 2003
  5. The Martian

    Help Help Help Pentax S5i Help needed (Please)

    The Martian, Jun 4, 2008, in forum: Digital Photography
    Replies:
    14
    Views:
    1,566
    ASAAR
    Jun 20, 2008
Loading...

Share This Page