- Katılım
- 12 Nisan 2012
- Mesajlar
- 533
- Excel Vers. ve Dili
- Microsoft office professional plus 2019
- Altın Üyelik Bitiş Tarihi
- 18-12-2024
Arkadaşlar internet de araştırdım bir kaç tane kod buldum ama çalıştıramadım.Userform başlık çubuğunu kaldıracak kod arıyorum .Yabancı dili olan arkadaşlar yine yabancı internet sitelerinden araştırabilir diye düşünüyorum.Aşağıdaki kod bende çalışmadı.Findwindow komutu için hata veriyor.İlgilenecek arkadaşa teşekkür ederim.
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
bu koduda userform kod sayfasına yerleştirin.
Kod:
Private Sub UserForm_Activate()
Dim lngFormHwnd As Long
Dim lngFormStyle As Long
If Application.Version < 9 Then
lngFormHwnd = FindWindow("THUNDERXFRAME", Me.Caption)
Else
lngFormHwnd = FindWindow("THUNDERDFRAME", Me.Caption)
End If
lngFormStyle = GetWindowLong(lngFormHwnd, (-16))
lngFormStyle = lngFormStyle And Not &H800000
SetWindowLong lngFormHwnd, (-16), lngFormStyle
DrawMenuBar lngFormHwnd
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
bu koduda userform kod sayfasına yerleştirin.
Kod:
Private Sub UserForm_Activate()
Dim lngFormHwnd As Long
Dim lngFormStyle As Long
If Application.Version < 9 Then
lngFormHwnd = FindWindow("THUNDERXFRAME", Me.Caption)
Else
lngFormHwnd = FindWindow("THUNDERDFRAME", Me.Caption)
End If
lngFormStyle = GetWindowLong(lngFormHwnd, (-16))
lngFormStyle = lngFormStyle And Not &H800000
SetWindowLong lngFormHwnd, (-16), lngFormStyle
DrawMenuBar lngFormHwnd