Boa noite, Equipe de fórum
Segue modelo de formulario para ocultar o "X" de formulario e tela de calendario está funcionando somente no ofiice 32 bits , só não funciona no office 64 bits, é possivel para office 64 bits.
Vídeo recomendado
https://youtu.be/diWPPPhW-9E
https://youtu.be/diWPPPhW-9E
Oculta "X" de formulario e calendario 64 bits [RESOLVIDO]
Oculta "X" de formulario e calendario 64 bits [RESOLVIDO]
- Anexos
-
- Arms VBA Calendar Form.rar
- (90.11 KiB) Baixado 234 vezes
Editado pela última vez por avgsantos em Seg Set 19, 2016 7:03 pm, em um total de 1 vez.
- netocasaroli
- Consultor
- Mensagens: 219
- Registrado em: Seg Mai 11, 2015 5:24 pm
- Localização: Londrina-PR
Re: Oculta "X" de formulario e calendario 64 bits
Boa tarde,
Para sistemas 64 bits você deve utilizar a instrução PtrSafe após a instrução Declare.
No módulo Oculta_X, substitua as instruções Declare por:
Para sistemas 64 bits você deve utilizar a instrução PtrSafe após a instrução Declare.
No módulo Oculta_X, substitua as instruções Declare por:
Código: Selecionar todos
#If VBA7 Then
'Localiza o form
Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'Captura o estilo atual da janela
Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
'Set o novo estilo
Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#Else
'Localiza o form
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'Captura o estilo atual da janela
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
'Set o novo estilo
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#End If
Re: Oculta "X" de formulario e calendario 64 bits
Boa noite, Neto Casaroli
Ok deu certo usei a mesma função "ptrsafe" no calendário funcionou perfeitamente.
obrigado
avgsantos
Ok deu certo usei a mesma função "ptrsafe" no calendário funcionou perfeitamente.
obrigado
avgsantos