Hello, it's me again, has anyone an idea how to display the caption of a form in the windows taskbar without displaying it on the form itself (so that the TtitleBar stays hidden)?
I hope that I didn't ask something very easy again :)
thx
Printable View
Hello, it's me again, has anyone an idea how to display the caption of a form in the windows taskbar without displaying it on the form itself (so that the TtitleBar stays hidden)?
I hope that I didn't ask something very easy again :)
thx
It's just a matter of removing the WS_CAPTION style.
Code: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 GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000
Private Sub Command1_Click()
Dim lStyle As Long
lStyle = GetWindowLong(hwnd, GWL_STYLE)
lStyle = lStyle Xor WS_CAPTION
SetWindowLong hwnd, GWL_STYLE, lStyle
End Sub
That's great! It's exatly what I've been searching for! Thank you very much!