- Katılım
- 10 Mart 2020
- Mesajlar
- 1
- Excel Vers. ve Dili
- excel 2019 tr
Option Explicit
Public Const MinBox = &H10000
Public Const MaxBox = &H20000
Public Const Style = (-16) Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) 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 DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
Public Sub mmEkle(ByVal FormCaption As String, ByVal MinButton As Boolean, ByVal MaxButton As Boolean)
Dim hWnd As Long
Dim lngStyle As
Long hWnd = FindWindow(vbNullString, FormCaption)
lngStyle = GetWindowLong(hWnd, Style)
If MaxButton Then
lngStyle = lngStyle Or MaxBox
End If
If MinButton Then
lngStyle = lngStyle Or MinBox
End If
SetWindowLong hWnd, Style, lngStyle DrawMenuBar hWnd
End Sub
Merhabalar bu kodda sıkıntı yaşıyorum
Hata mesajı şu
derleme hatası: bu projedeki kod 64 bit sistemde kullanılmak üzere güncellenmelidir. lütfen bildirimleri inceleyin ve ubdate beyan edin ve ardından bunları PtrSafe özniteliğiyle işaretleyin
Public Const MinBox = &H10000
Public Const MaxBox = &H20000
Public Const Style = (-16) Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) 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 DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
Public Sub mmEkle(ByVal FormCaption As String, ByVal MinButton As Boolean, ByVal MaxButton As Boolean)
Dim hWnd As Long
Dim lngStyle As
Long hWnd = FindWindow(vbNullString, FormCaption)
lngStyle = GetWindowLong(hWnd, Style)
If MaxButton Then
lngStyle = lngStyle Or MaxBox
End If
If MinButton Then
lngStyle = lngStyle Or MinBox
End If
SetWindowLong hWnd, Style, lngStyle DrawMenuBar hWnd
End Sub
Merhabalar bu kodda sıkıntı yaşıyorum
Hata mesajı şu
derleme hatası: bu projedeki kod 64 bit sistemde kullanılmak üzere güncellenmelidir. lütfen bildirimleri inceleyin ve ubdate beyan edin ve ardından bunları PtrSafe özniteliğiyle işaretleyin