Results 1 to 3 of 3

Thread: Form caption in taskbar...

  1. #1

    Thread Starter
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Question Form caption in taskbar...

    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

  2. #2
    Megatron
    Guest
    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

  3. #3

    Thread Starter
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Thank You!

    That's great! It's exatly what I've been searching for! Thank you very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width