PDA

Click to See Complete Forum and Search --> : Enable/Disable Textboxes


Xiquon
Jun 1st, 2001, 12:17 PM
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

Megatron
Jun 1st, 2001, 02:20 PM
Use the EnableWindow function.

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)