CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2019
    Location
    Ahmedabad
    Posts
    7

    How to disable and enable a click event on a button in visual studio c#

    I have a form with 10 buttons. I want that when I click a button, the event of the button get disable so it cant be click twice, but to get enable when click another button.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How to disable and enable a click event on a button in visual studio c#

    Don't mess with the event wiring, just disable the button (and the event won't get triggered).

  3. #3
    Join Date
    May 2019
    Location
    601 & 612, The Times square Arcade, Near Baghban party plot, Thaltej - Shilaj Rd, Thaltej, Ahmedabad, Gujarat 380059, India
    Posts
    7

    Re: How to disable and enable a click event on a button in visual studio c#

    button.Enabled=false

Tags for this Thread

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

Featured