Results 1 to 3 of 3

Thread: [RESOLVED] [02/03] Easiest way to detect the status change

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Resolved [RESOLVED] [02/03] Easiest way to detect the status change

    Hi all,

    I've few number of text boxes and check boxes on different tab pages. On the change of the status on any control, I want to enable a button. What's the easiest way to do it?

    If I try with the state change of each control I've to use large number of methods. I want to avoid it as much as possible.

    Thanks.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Easiest way to detect the status change

    You can just use one method to handle multiple events. You just put each event in the Handles clause of the method. They don't even have to be the same event, as long they have the same signature. You can use the same method to handle TextChanged events of TextBoxes and SelectedIndexChanged events of ComboBoxes because they both have the same signature.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: [02/03] Easiest way to detect the status change

    Thanks lol, I've solve the problem.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

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