Results 1 to 4 of 4

Thread: Focus on apps

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    22

    Post

    How can I use sendmessage() to force a toolwindow to hide or stay on bottom? And can I use the caption of the toolwindow to find the hwnd to use for sendmessage()?
    May the source be with you

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    22

    Post

    What I mean is... I have a extremly annoying ad banner that is set to stay on top. I want to us sendmessage() to tell it to stay in the background or to dissappear.

  3. #3
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    You don't have to use SendMessage, but instead you can use ShowWindow. First, you need to know the window handle (hWnd) for the window you want to hide. Let's say you already have a handle for that window, then you would use something liek this:

    Code:
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Private Const SW_HIDE = 0
    
    Private Sub Command1_Click()
        Call ShowWindow(lHwnd, SW_HIDE)
    End Sub
    Where lHwnd is a valid window handle.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    22

    Post Thanks Serge

    Thanks alot. I just got it to work.
    May the source be with you

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