Guys can you help about this Code
Option Explicit
#If VBA7 Then
Private Declare PtrSafe Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe Function GetWindowLongPtr Lib "USER32" Alias "GetWindowLongPtrA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare PtrSafe Function SetWindowLongPtr Lib "USER32" Alias "SetWindowLongPtrA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#Else
Private Declare PtrSafe Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) 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 SetWindowLong Lib "USER32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#End If
Private Const GWL_Style = (-16)
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_MIXIMIZEBOX = &H10000
Public Sub AddManimizeButton(ByVal UserForm As Object)
Dim hWnd As LongPtr, Istyle As LongPtr
hWnd = FindWindow("ThunderDFrame", UserForm.Caption)
Istyle = GetWindowLongPtrA(hWnd, GWL_Style)
Istyle = Istyle Or WS_MANIMIZEBOX
Call SetWindowLongPtrA(hWnd, GWL_Style, Istyle)
End Sub
Public Sub AddMaximizeButton(ByVal UserForm As Object)
Dim hWnd As LongPtr, Istyle As LongPtr
hWnd = FindWindow("ThunderDFrame", UserForm.Caption)
Istyle = GetWindowLongPtr(hWnd, GWL_Style)
Istyle = Istyle Or WS_MAXIMIZEBOX
Call SetWindowLongPtr(hWnd, GWL_Style, Istyle)
End Sub
Option Explicit
#If VBA7 Then
Private Declare PtrSafe Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe Function GetWindowLongPtr Lib "USER32" Alias "GetWindowLongPtrA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare PtrSafe Function SetWindowLongPtr Lib "USER32" Alias "SetWindowLongPtrA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#Else
Private Declare PtrSafe Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) 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 SetWindowLong Lib "USER32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#End If
Private Const GWL_Style = (-16)
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_MIXIMIZEBOX = &H10000
Public Sub AddManimizeButton(ByVal UserForm As Object)
Dim hWnd As LongPtr, Istyle As LongPtr
hWnd = FindWindow("ThunderDFrame", UserForm.Caption)
Istyle = GetWindowLongPtrA(hWnd, GWL_Style)
Istyle = Istyle Or WS_MANIMIZEBOX
Call SetWindowLongPtrA(hWnd, GWL_Style, Istyle)
End Sub
Public Sub AddMaximizeButton(ByVal UserForm As Object)
Dim hWnd As LongPtr, Istyle As LongPtr
hWnd = FindWindow("ThunderDFrame", UserForm.Caption)
Istyle = GetWindowLongPtr(hWnd, GWL_Style)
Istyle = Istyle Or WS_MAXIMIZEBOX
Call SetWindowLongPtr(hWnd, GWL_Style, Istyle)
End Sub