|
-
Dec 14th, 2005, 11:27 PM
#1
Thread Starter
Hyperactive Member
Detect if Window or Control is Enabled
Is there a code that checks if a window or control is enabled or disabled?
-
Dec 14th, 2005, 11:39 PM
#2
Re: Detect if Window or Control is Enabled
not really. if you check to see if it's enabled, it will be loaded. it's better to have a flag to show the state for use in another procedure.
-
Dec 14th, 2005, 11:54 PM
#3
Re: Detect if Window or Control is Enabled
Like check its Enabled Property?
-
Dec 14th, 2005, 11:57 PM
#4
Re: Detect if Window or Control is Enabled
Checking the property will load and enable it.
-
Dec 15th, 2005, 12:00 AM
#5
Re: Detect if Window or Control is Enabled
Command2 returned false...
VB Code:
Private Sub Command1_Click()
frmCancelReason.Enabled = False
End Sub
Private Sub Command2_Click()
MsgBox frmCancelReason.Enabled
End Sub
-
Dec 15th, 2005, 10:48 AM
#6
Thread Starter
Hyperactive Member
Re: Detect if Window or Control is Enabled
I'm talking about checking if a window or control in another program is enabled.
-
Dec 15th, 2005, 02:02 PM
#7
Re: Detect if Window or Control is Enabled
Don't get what you mean but you can cycle through the Screen.ActiveControl method to find what controls are enabled or look through the Controls Collection and the Forms Collection to see what is loaded.
-
Dec 15th, 2005, 09:06 PM
#8
Thread Starter
Hyperactive Member
Re: Detect if Window or Control is Enabled
Never mind. I found the IsWindowEnabled and IsWindowVisible APIs.
Last edited by abazabam; Dec 15th, 2005 at 09:22 PM.
-
Dec 16th, 2005, 09:30 AM
#9
Re: Detect if Window or Control is Enabled
 Originally Posted by abazabam
Never mind. I found the IsWindowEnabled and IsWindowVisible APIs.
This would give you information on the Window itself, not the controls within the window.
-
Jun 27th, 2010, 02:54 PM
#10
New Member
Re: Detect if Window or Control is Enabled
 Originally Posted by Hack
This would give you information on the Window itself, not the controls within the window.
It is quite possible.
You have to find the the handle of child control using FindWindowEx.
After you get the handle you just have to pass the handle to this function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|