By the way I was able to hide the Titlebar via API...
Code:Option Explicit Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long 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 DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Declare Function ReleaseCapture Lib "user32" () As Long Private Const GWL_STYLE As Long = (-16) Private wHandle As Long Private Sub UserForm_Initialize() 'HideTitleBar Me Dim frm As Long, frmstyle As Long If Val(Application.Version) >= 9 Then wHandle = FindWindow("ThunderDFrame", Me.Caption) Else wHandle = FindWindow("ThunderXFrame", Me.Caption) End If If wHandle = 0 Then Exit Sub frm = GetWindowLong(wHandle, GWL_STYLE) frm = frm Or &HC00000 SetWindowLong wHandle, -16, frmstyle DrawMenuBar wHandle End Sub
Mechanic





Reply With Quote

Bookmarks