User Form

  • Thread starter Thread starter amit
  • Start date Start date
hi joel - thx for your reply........my question was is it possible to totally
remove the strip with the X close button from the userform.....

thx.
 
Not as far as i know. If you just need to control the use of the "X",
have a look at the queryclose event.

hth

Keith
 
Hi amit,
Do not forget a button to close the userform.

Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function SetWindowLong& Lib "user32" Alias _
"SetWindowLongA" (ByVal hWnd&, ByVal nIndex&, ByVal wNewWord&)
Private Declare Function DrawMenuBar& Lib "user32" (ByVal hWnd&)

Private Sub UserForm_Initialize()
Dim hWnd&
hWnd = FindWindow(vbNullString, Me.Caption)
SetWindowLong hWnd, -16, &H84080080 ' remove caption
DrawMenuBar hWnd
SetWindowLong hWnd, -20, &H40000 ' remove borders
End Sub

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top