Van T. Dinh said:
Not that I am aware of for maximised Form since the Form's caption
has to go somewhere.
Tom said:
Thanks Van
That's removed Microsoft Access but leaves us with ' - []' - cna
that be remove?
I've been tinkering with this, and it appears that you can use the
Windows API to set the form's caption to a zero-length string, and then
the "- []" won't appear. I cribbed some code from
http://pietschsoft.com/programming/vbapi/ref/w/wm_settext.html .
Here's code from my test form's module:
'----- start of code -----
Option Compare Database
Option Explicit
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 Const WM_SETTEXT = &HC
Function NoCaption()
Dim wintext As String ' string to set as the window's text
Dim retval As Long ' return value of message
' Store the desired text in a string.
wintext = "" ' in this case, no text at all.
' Send a message telling the form's window to make that string
' its text.
retval = SendMessage(Me.hWnd, WM_SETTEXT, _
ByVal CLng(0), ByVal wintext)
' ** Could use the following to blank the Access application
' ** window's caption.
' retval = SendMessage(Application.hWndAccessApp, _
WM_SETTEXT, ByVal CLng(0), ByVal wintext)
End Function
'----- end of code -----
Then I called the function directly from the form's Open event, by
putting this function expression in the form's OnOpen property:
=NoCaption()
That seems to take care of it, in both restored and maximized state.
Note that I'm not really an API maven, so I don't know if this technique
has unpleasant ramifications.