Hide minimise, maximise, and close buttons on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way of hiding these buttons on the top right hand corner of a form. The program in question is a COM addin for Excel.
 
UserForms don't have minimoze or maximize buttons. The Close button can be
disabled. Or are you referring to a different kind of form?

--

Vasant


Gordon Garnsey said:
Is there any way of hiding these buttons on the top right hand corner of a
form. The program in question is a COM addin for Excel.
 
I understood they were userforms but what types are there. In the Project window of the
IDE we have Forms, Modules, and Class modules.
My forms are usually of the modeless type
I am currently disabling the X button but wish to get rid of the three of them because
they are untidy, create confusion, and are not used
 
The following shows how the form is set up. Ring any bells

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String,
ByVal lpWindowName As String) As Lon

Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Lon

Public Sub SetParentToExcel(
Level = Level + 1: StackString = StackString & "(ChartSelectorMenu:SetParentToExcel)": Debug.Print CStr(Level) & StackStrin
Dim XLHWnd As Lon
Dim MeHWnd As Lon
On Error Resume Nex
XLHWnd = FindWindow("XLMAIN", App.Caption
MeHWnd = FindWindow("ThunderRT6DFrame", Me.Caption
SetParent MeHWnd, XLHWn
Level = Level - 1: StackString = Mid(StackString, 1, InStrRev(StackString, "(", -1, 1) - 1): Debug.Print CStr(Level) & StackStrin
End Sub
 
Back
Top