CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2000
    Posts
    40

    How can program know if a control is enabled or not in VB?

    I need to get the current state(Enabled or disabled) of a control through program. I am wondering how to do that?

    Thanks for help



  2. #2
    Join Date
    Jun 2001
    Location
    Sri Lanka
    Posts
    272

    Re: How can program know if a control is enabled or not in VB?

    (Assume the Control name is cnt)
    code is: cnt.Enabled
    eg.

    if cnt.Enabled then
    MsgBox "the control is Enabled"
    else
    MsgBox "the control is Disabled"
    end if




    Too simple , isn't it?
    Srinika

    If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it

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