|
|
|
|
|
Dicas
|
|
Visual Basic (Forms/MDI)
|
|
|
Título da Dica: Desabilitar o Close Button do Form
|
|
|
|
Postada em 28/10/2002 por Alex Monteiro
alex_monteiro@terra.com.br
Bom dia. Para tirar o close button do form:
'Coloque no modulo do seu programa: Public Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert 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 SC_CLOSE = &HF060& Public Const MF_BYCOMMAND = &H0&
'No form do qual vc deseja tirar o close button, faça no evento load: Dim lngHMenu As Long lngHMenu = GetSystemMenu(Me.hwnd, False) RemoveMenu lngHMenu, SC_CLOSE, MF_BYCOMMAND
Abraço, Alex
|
|
|
|
|