Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Dim dwReturn As Long
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
Call fAccessWindow("Hide", False, False)
bu komutla declareden sonra ptrsafe komutu getirerek sorunu çözdüm teşekkürler accesstr
PtrSafe komutu
Bu Konudaki Yorumlar |
PtrSafe komutu - Yazar: stromax - 19/01/2015, 11:42
Cvp: PtrSafe komutu - Yazar: atoz112 - 19/01/2015, 12:28
Cvp: PtrSafe komutu - Yazar: yorum70 - 20/01/2015, 19:11
Cvp: PtrSafe komutu - Yazar: atoz112 - 25/01/2015, 14:22
Cvp: PtrSafe komutu - Yazar: stromax - 04/02/2015, 10:01
|
Konuyu Okuyanlar: 1 Ziyaretçi