'kill destroy
'   从窗体中移除控件。销毁控件
'   hWndControl: 控件的句柄 (例如  HWND_FORM1_COMMAND1)
'   Returns:     0 if error, non-zero if successful
Function FF_Control_Kill (ByVal hWndControl As HWND) As Long
    
    '检查窗口句柄是否有效
    If IsWindow(hWndControl) Then  
          
        ' Simply destroy the Control. This will send a WM_DESTROY
        ' message to the control. In that message, FireFly will
        ' clean up by deallocated any data saved to the hWnd of
        ' the Control and/or any created GDI objects.
        Function = DestroyWindow(hWndControl)

    End If
    
End Function

