Skip to main content

AccessTr.neT


Compile error in hidden module hatası çözümü nedir?

Compile error in hidden module hatası çözümü nedir?

#4
İlginize çok tşk ederim..İşletim sistemi ve Office 2013 64 bit..sanırım bundan kaynaklıymış.
Yorum70 hocamın 64 Bit hatası olabilir mi ? Declare'den sonra ptrsafe eklemeniz gerekebilir,demesine istinaden koda uyguladım ve sorun ortadan kalktı..

Çok tşk ederim..

Konu taşınabilir.

Kodun Son Şekli Şu Şekilde;

Option Compare Database


#If VBA7 Then

Private Declare PtrSafe Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Dim dwReturn As Long
#Else
Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Dim dwReturn As Long
#End If

Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1
Const SW_SHOWMINIMIZED = 2
Const SW_SHOWMAXIMIZED = 3

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
If Procedure = "Hide" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End If
If Procedure = "Show" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
If Procedure = "Minimize" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
End If
If SwitchStatus = True Then
If IsWindowVisible(hWndAccessApp) = 1 Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
Else
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
End If
If StatusCheck = True Then
If IsWindowVisible(hWndAccessApp) = 0 Then
fAccessWindow = False
End If
If IsWindowVisible(hWndAccessApp) = 1 Then
fAccessWindow = True
End If
End If
End Function
Son Düzenleme: 10/10/2015, 20:56, Düzenleyen: mehami.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Cvp: Compile error in hidden module hatası çözümü nedir? - Yazar: mehami - 10/10/2015, 20:54
Task