Results 1 to 2 of 2

Thread: Extended User Control

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Extended User Control

    Hello
    Im extending the Windows Forms Button to make my own control called TimedButton. The only difference would be, that my control would include a property called Span(which is integer). The function of this property is to make a dynamic button and for less user interaction. If this Span is set for a value greater than 0, than the button's text would automatically show time in it, the number of seconds remaining according to the value provided in span.
    Say for e.g. Span is 10, then the button text would automatically get updated after every second to display somthing like this "Button 1 (10)" .. "Button 1 (9)" ... "Button 1 (8) .. n so on until it reaches 0. Which means that the span has expired n now i want to raise the click event of the button. how would i do that.
    I have attached the code as well to have a look.
    Attached Files Attached Files
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Extended User Control

    Use:
    VB Code:
    1. MyBase.OnClick(New EventArgs)
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width