#Include once "window9.bi"

Function DisableGadget Alias "DisableGadget" (ByVal gadget As Integer,ByVal state As byte) As Integer Export
  If state=1 Then
    Return EnableWindow(Cast(HWND,GadgetID(gadget)),0)
  Else
    Return EnableWindow(Cast(HWND,GadgetID(gadget)),1)
  End If
End Function
