Make your own free website on Tripod.com

AllApi.net

[an error occurred while processing this directive]
 
'This project needs two command buttons
Private Declare Function IsWindowEnabled Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
Private Sub Command2_Click()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    
    ' Reverse the enabled status of Command1. If the window is
    ' disabled, enable it; if it is enabled, disable it.
    Dim wasenabled As Long ' receives enabled/disabled status of Command1
    Dim retval As Long ' return value
    ' Determine if the window Command1 is currently enabled or not.
    wasenabled = IsWindowEnabled(Command1.hwnd)
    If wasenabled = 0 Then ' if not enabled, enable it
        retval = EnableWindow(Command1.hwnd, 1)
    Else ' if enabled, disable it
        retval = EnableWindow(Command1.hwnd, 0)
    End If
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/