|
|
#1 |
|
Junior Member
Join Date: Jun 2002
Posts: 5
|
gettin winamp window title
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Sub Form_Load() Dim hwndWinamp As Long hwndWinamp = FindWindow("Winamp v1.x", vbNullString) sWindowText = Space(255) r = GetWindowText(hwndWinamp, sWindowText, 255) sWindowText = Left(sWindowText, r) MsgBox sWindowText End Sub ------------------------------------------- thats the code i have atm, as far as i can see that *should* fill swindowtext with the winamp window title... but it doesn't, i end up with the length of the title in spaces... but not the title!! what am i doing wrong ? |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|