Results 1 to 2 of 2

Thread: give focus to Winamp window

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    US
    Posts
    20

    Post

    I would like to know how to give focus(Higlight) Nulsoft's Winamp window with its ever changing caption...

    Any Help?

    Andy

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    If WinAmp is in background (not Minimized) you can use this:
    Code:
    Private Declare Function BringWindowToTop Lib "user32.dll" (ByVal hwnd As Long) As Long
    Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
    
    Private Sub Command1_Click()
        Dim hwnd As Long
    
        hwnd = FindWindow("Winamp v1.x", CLng(0))
        BringWindowToTop hwnd
    End Sub
    Winamp v1.x is a class name for WinAmp Window. You may have to check it to make sure (use Spy++ to do it)

    If winamp is miniminized then you can use ShowWindow API to maximize it.
    HTH

    ------------------
    Visual Basic Programmer
    ------------------
    PolComSoft
    You will hear a lot about it.

    [This message has been edited by QWERTY (edited 02-20-2000).]

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