I’m overriding the CreateParams property in my form to draw a custom oversized titlebar:
Protected Overrides ReadOnly Property CreateParams As System.Windows.Forms.CreateParams
Get
CreateParams = MyBase.CreateParams
CreateParams.Style = CInt(CreateParams.Style And Not &HC00000L) 'WS_CAPTION
End Get
End Property
And I’ve overridden WndProc to allow the form to be dragged:
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
MyBase.WndProc(m)
If m.Msg = &H84 AndAlso m.Result.ToInt32() = 1 Then m.Result = New IntPtr(2)
End Sub
But the control box (close and minimize) disappears. Is there any way to keep the control box and the text in the taskbar, but remove the usual title?
If I understood you right, you want to hide the title (and maybe the icon) from the titlebar, but not from the taskbar, just like the Vista/7 Explorer window.
This should help you:
MSDN Forums
Use this method with your preferred WTA_OPTIONS (should be 0x03) in pvAttribute.