Well for a VB application you just need to set the forms ControlBox property to false at designtime, and then you can use toggle the state of the titlebar at runtime by setting or unsetting the Caption property. Unfortunately you can't get the ControlBox back.
And here's an illustration of a method that theoetically works for any window (to demonstrate the example you'll need to create a project with a single form with a command button; you'll also need to open a copy of Notepad):
[tt]
Option Explicit
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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
' SetWindowPos flag constants
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOZORDER = &H4
Private Const SWP_FRAMECHANGED = &H20
Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000
Private Sub Command1_Click()
ToggleTitleBar "Untitled - Notepad"
End Sub
' Toggles visibility of a named window's titlebar
' Returns handle of window changed if successful
' Returns 0 if window cannot be found
Private Function ToggleTitleBar(strWindowTitle As String) As Long
Dim hWnd As Long
hWnd = FindWindow(vbNullString, strWindowTitle)
If hWnd Then
SetWindowLong hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) Xor WS_CAPTION
SetWindowPos hWnd, 0&, 0&, 0&, 0&, 0&, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOZORDER Or SWP_FRAMECHANGED ' Forces nominated window to redraw itself correctly
End If
ToggleTitleBar = hWnd
End Function