RELATORIOS NO ACCESS 2010

EDINALDOLA 10/03/2014 12:00:13
#435766
Amigos, alguém sabe como desabilitar os botões de Maximizar, Restaurar e Fechar nos Relatórios do Access 2010 ?
Grato
MARCELODAVID 10/03/2014 12:19:42
#435769
Da janela do access ou dos formulários?
EDINALDOLA 10/03/2014 12:38:27
#435771
Da janela do access.
MARCELODAVID 10/03/2014 12:46:46
#435772
Exemplo do amigo JPaulo:

Em um módulo:

Option Compare Database

Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_SYSMENU = &H80000
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOZORDER = &H4
Public Const SWP_FRAMECHANGED = &H20


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

Private Declare Function SetWindowPos _
Lib [Ô]user32[Ô] ( _
ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long) As Long


Public Function EscondeBotoes(Show As Boolean) As Long
Dim Janela As Long
Dim AtribueIndex As Long
Dim AtribueNovoLongo As Long
Dim AtribueLongo As Long

Janela = hWndAccessApp
AtribueIndex = GWL_STYLE

Const wFlags = SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGED + SWP_NOMOVE
Const FLAGS_COMBI = WS_MINIMIZEBOX Or WS_MAXIMIZEBOX Or WS_SYSMENU

AtribueLongo = GetWindowLong(Janela, AtribueIndex)

If Show Then
AtribueNovoLongo = (AtribueLongo Or FLAGS_COMBI)
Else
AtribueNovoLongo = (AtribueLongo And Not FLAGS_COMBI)
End If

Call SetWindowLong(Janela, AtribueIndex, AtribueNovoLongo)
Call SetWindowPos(Janela, 0&, 0&, 0&, 0&, 0&, wFlags)

End Function



Para chamar, use no eventos mais apropriado o seguinte:

Call EscondeBotoes(False)

Tópico encerrado , respostas não são mais permitidas