Ir para conteúdo
Fórum Script Brasil

Fábio Luis Leitão

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Sobre Fábio Luis Leitão

Fábio Luis Leitão's Achievements

0

Reputação

  1. Boa noite, é possível sim contanto que a referencia que controle a execução de tal evento no FE execute com o Runtime do Access, nem todas as referencias, ocx/dll rodam com Runtime.
  2. Amigo voce poderia resolver isso de duas formas. 1° Utilizando Ribbon, ai voce define o que ira aparecer no topo do formulario via XML 2° Criando um modulo com o Código abaixo Option Compare Database Option Explicit 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 GetWindowLong Lib "user32" Alias "GetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetLayeredWindowAttributes Lib "user32" _ (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long 'Constantes Private Const GWL_EXSTYLE = (-20) Private Const WS_EX_LAYERED = &H80000 Private Const LWA_ALPHA = &H2 Function AccessTransparente(Nivel As Integer) Dim lngHwnd As Long If Nivel < 0 Or Nivel > 250 Then Exit Function lngHwnd = Application.hWndAccessApp SetWindowLong lngHwnd, GWL_EXSTYLE, GetWindowLong(lngHwnd, GWL_EXSTYLE) Or WS_EX_LAYERED SetLayeredWindowAttributes lngHwnd, 0, Nivel, LWA_ALPHA End Function ' 'Ejemplo de uso: 'Private Sub Form_Load() 'Call AccessTransparente(175) 'End Sub Depois é necessário que você crie a função Call AccessTransparente(0) no formulario "Ao Carregar / On Load" E definir o nível de transparência do formulário Existe também esse Modulo abaixo para esconder tudo e deixar somente o formulário aberto. Você tem que definir o formulário como Pop-up e fixo. Toma cuidado na hora de usar os módulos, por que se você mudar algo errado, o sistema não abre mais e fica só o MSACCESS.exe no Gerenciador de tarefas, o resto fica oculto. Faça backup antes de testar. Eu particularmente uso Ribbons e XML, não deixo só o formulário, eu uso menus em cima também. Global Const SW_HIDE = 0 Global Const SW_SHOWNORMAL = 1 Global Const SW_SHOWMINIMIZED = 2 Global Const SW_SHOWMAXIMIZED = 3 Private Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Function fSetAccessWindow(nCmdShow As Long) Dim loX As Long Dim loForm As Form On Error Resume Next Set loForm = Screen.ActiveForm If Err <> 0 Then loX = apiShowWindow(hWndAccessApp, nCmdShow) Err.Clear End If If nCmdShow = SW_SHOWMINIMIZED And loForm.Modal = True Then MsgBox "Cannot minimize Access with " _ & (loForm.Caption + " ") _ & "form on screen" ElseIf nCmdShow = SW_HIDE And loForm.PopUp <> True Then MsgBox "Cannot hide Access with " _ & (loForm.Caption + " ") _ & "form on screen" Else loX = apiShowWindow(hWndAccessApp, nCmdShow) End If fSetAccessWindow = (loX <> 0) End Function
×
×
  • Criar Novo...