Click to See Complete Forum and Search --> : API Enable
DrBrain
Aug 2nd, 2000, 12:01 PM
anyone know witch API to use when I want to enable/disable a command-button just with API. SetWindowLong, SendMessage or some other API?
The EnableWindow API should do it.
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Sub Command1_Click()
'Disable Command1. Pass True instead of False to enable it
EnableWindow Command1.hwnd, False
End Sub
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.