Então... vc pode adaptar as duas opções às suas necessidades, do contrário, disponibilize a planilha para ser adaptada.
Ou então, vc pode excluir o X (lazarento) do formulário. Para isto, siga os passos abaixo:
Insira o código em um novo MÓDULO
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) _
As Long
Private Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" _
(ByVal hwnd As Long, _
ByVal nIndex As Long) _
As Long
Private Declare Function SetWindowLong Lib "user32" _
Alias "SetWindowLongA" _
(ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) _
As Long
Const GWL_STYLE = (-16)
Const WS_SYSMENU = &H80000
Sub Charlie81(xForm)
Dim hwnd As Long
Dim GetStyle As Long
Dim StApp As String
Select Case Int(Val(Application.Version))
Case 8
StApp = "ThunderXFrame"
Case Is > 8
StApp = "ThunderDFrame"
End Select
hwnd = FindWindow(StApp, xForm.Caption)
GetStyle = GetWindowLong(hwnd, GWL_STYLE)
SetWindowLong hwnd, GWL_STYLE, GetStyle And Not WS_SYSMENU
End Sub
No evento initialize do formulário, acrescente:
Charlie81 Me
Blue eye | MB Intel Extreme DX58SO | Termaltake 775W | I7 950 LGA 1366 (Overclock 5.3 GZ) | Corsair Vengeance 16 GB | WC Corsair H70 | Aerocool Touch 2000 | Razer Mamba 4G | Som Volcano 50W RMS | Cooler Zalmam | HD 2TB | Radeon HD 8670 | Monitor 32'
Postado : 18/09/2012 12:21 pm