Skip to main content

AccessTr.neT


Simge Durumu

Simge Durumu

#12
dilerim işinize yarar
Modül kodları;
Private Const WS_EX_APPWINDOW = &H40000
Private Const GWL_STYLE = -20

#If VBA7 And Win64 Then '64 bit için
Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long

Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long) As Long
Private Declare PtrSafe Function apiShowWindow Lib "user32" Alias "ShowWindow" ( _
ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long

#Else '32 bit için
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 apiShowWindow Lib "user32" Alias "ShowWindow" ( _
ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long

#End If

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
If nCmdShow = SW_HIDE Then
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If
Else

loX = apiShowWindow(hWndAccessApp, nCmdShow)

End If
fSetAccessWindow = (loX <> 0)
End Function

Public Function ShowInTaskbar(Lhwnd As Long, Show As Boolean)
Dim lStyle As Long
lStyle = GetWindowLong(Lhwnd, GWL_STYLE)

If Show Then
lStyle = lStyle Or WS_EX_APPWINDOW
Else
lStyle = lStyle And Not WS_EX_APPWINDOW
End If

Call SetWindowLong(Lhwnd, GWL_STYLE, lStyle)
fSetAccessWindow (0)
End Function
formun kapanma olayının kodları( bu kodlar sadece ana forma eklenecek);
Private Sub Form_Close()
fSetAccessWindow (5)
End Sub
yüklenme olayının kodları
Private Sub Form_Load()
ShowInTaskbar Me.hwnd, True
End Sub
ana formun kenarlık sitili:BOYUTLANDIRILABİLİR olacak
.rar Gizle_goster_hy.rar (Dosya Boyutu: 516,95 KB | İndirme Sayısı: 6)
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
Simge Durumu - Yazar: enginbeyy - 05/07/2020, 14:42
RE: Simge Durumu - Yazar: berduş - 05/07/2020, 14:45
RE: Simge Durumu - Yazar: enginbeyy - 05/07/2020, 15:06
RE: Simge Durumu - Yazar: berduş - 05/07/2020, 15:08
RE: Simge Durumu - Yazar: enginbeyy - 05/07/2020, 15:14
RE: Simge Durumu - Yazar: berduş - 05/07/2020, 16:07
RE: Simge Durumu - Yazar: enginbeyy - 05/07/2020, 16:15
RE: Simge Durumu - Yazar: berduş - 05/07/2020, 16:16
RE: Simge Durumu - Yazar: enginbeyy - 05/07/2020, 16:26
RE: Simge Durumu - Yazar: berduş - 05/07/2020, 17:21
RE: Simge Durumu - Yazar: enginbeyy - 05/07/2020, 18:22
RE: Simge Durumu - Yazar: berduş - 05/07/2020, 22:24