Results 1 to 2 of 2

Thread: Enable/Disable Textboxes

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    18

    Enable/Disable Textboxes

    I have 2 seperate programs that run at the same time.
    One has the user name and password login boxes. And the other program has all the data.

    Depending on who you logon as, depends on what text boxes you can edit and send to the database.

    I am having a hard time trying to grab the parent and child windows and enabling those text boxes! I was looking through the styles of the text box and I didn't even see an enable/disable property?

    So far I have this:

    hWnd = FindWindow(vbNullString, "YOURFORMNAME")
    hWnd = FindWindowEx(hWnd, 0, "ThunderRT6TextBox", vbNullString)

    Can any one help to lead me in the right direction?

    Thanks

    -Xiquon

  2. #2
    Megatron
    Guest
    Use the EnableWindow function.
    Code:
    Private Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
    
    'Usage 
    EnableWindow hwnd_of_window, True '(change to false to disable 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