Simge Durumu - enginbeyy - 05/07/2020
Merhaba ekteki dosyayı kullanmadığım zaman simge durumuna almak istiyorum. Bu mümkün mü acaba?
RE: Simge Durumu - berduş - 05/07/2020
Konuyu ve mesajı inceleyebilirsiniz
RE: Simge Durumu - enginbeyy - 05/07/2020
(05/07/2020, 14:45)berduş yazdı: Konuyu ve mesajı inceleyebilirsiniz hocam modülü oluşturdum verdiğiniz kodu da içine yapıştırdım her iki formun yüklendiğinde olayına da diğer kodu yapıştırdım ama olmadı. fotoğraftaki alanıda değişik değişik seçerek denedim yine olmadı.
[img][/img]
RE: Simge Durumu - berduş - 05/07/2020
Son halini ekleyin inceleyelim.
RE: Simge Durumu - enginbeyy - 05/07/2020
(05/07/2020, 15:08)berduş yazdı: Son halini ekleyin inceleyelim. tamam hocam burda
RE: Simge Durumu - berduş - 05/07/2020
siz modüle sadece formu simge durumuna getirme kodu eklemişsiniz, Access penceresini gizleme kodlarını eklememişsiniz o nedenle sadeve form küçülüyor Access penceresi değil.
Modul kodu
#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
Private Const WS_EX_APPWINDOW = &H40000
Private Const GWL_STYLE = -20
Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3
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 (SW_HIDE)
End Function
form load koduShowInTaskbar Me.hwnd, True dikkatimden kaçmış olabilir ama sizin formda küçültme özelliği pasif değilmiydi?
|