RE:Deshabilitar Boton Cerrar
Crea un módulo de código e insértale el siguiente código:
Public Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Public Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Public Const MF_BYPOSITION = &H400&
Public Const MF_REMOVE = &H1000&
Public Sub NoCmdClose(FRM As Form)
Dim hSysMenu As Long, nCnt As Long
hSysMenu = GetSystemMenu(FRM.hwnd, False)
If hSysMenu Then
nCnt = GetMenuItemCount(hSysMenu)
If nCnt Then
RemoveMenu hSysMenu, nCnt - 1, MF_BYPOSITION Or MF_REMOVE
RemoveMenu hSysMenu, nCnt - 2, MF_BYPOSITION Or MF_REMOVE ' Remove the seperator
DrawMenuBar FRM.hwnd
End If
End If
End Sub
Después, solo bastará que hagas lo siguiente en el Load del formulario:
Private Sub Form_Load()
NoCmdClose Me
End Sub
Espero que te sirva...