|
|
#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 ? |
|
|
|
|
|
#2 |
|
Moderator
|
I think that you are looking for a returned version number?
code: I hope that you can use this. Just copy/paste into an empty form. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2002
Posts: 5
|
no, i want the window title which will include the current playing track
|
|
|
|
|
|
#4 |
|
Moderator
|
Well I guess that you could try this code:
code: Just copy and past it into a form again. It should work!
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2002
Posts: 5
|
thx, sorry for the late reply but ive been busy, the code worked straight away
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|