• Welcome to Valhalla Legends Archive.
 

Winamp volume help.

Started by OuTLawZGoSu, December 04, 2003, 05:29 PM

Previous topic - Next topic

OuTLawZGoSu

I got this:
____________________

'Module:

Public Sub Volume(VolData As Long, waclass As String)
 ' Sets Volume (0-255)
 
 RetVal = SendMessage(hWndWinamp, WM_USER, VolData, waVolume)

End Sub
____________________

How can I use this in a button subrutine?

Stealth

First off, waclass doesn't appear to be used in your code, so there's no reason to pass it.

Offhand:


Private Sub cmdWinampVolumeMax_Click()
    Call Volume(255) 'or (255, "")
End Sub


If you wanted to implement like a volume-up/down button system you'd have to either keep track of winamp's volume or (better) request it from Winamp each time. I'm not sure how to do this but I'm sure the NSDN should have plenty of info.
- Stealth
Author of StealthBot

OuTLawZGoSu

#2
Quote from: Stealth on December 04, 2003, 05:47 PM
First off, waclass doesn't appear to be used in your code, so there's no reason to pass it.


Private Sub cmdWinampVolumeMax_Click()
    Call Volume(255) 'or (255, "")
End Sub



EDIT: Hmmmm..... Now it doesn't do anything after I added: "Public RetVal As Long" to the module.

UserLoser.

Are you correctly gettng the hwnd of Winamp?  AFAIK, Winamp has only released information on Winamp 1 and 2, maybe you're running a Winamp 3 or higher, and that's why it won't work? Do you have WM_USER correctly defined?

Stealth

Yes, are all those variables you send to Winamp actually declared or are you not using option explicit so they're all declared on the fly as null-value Variants?
- Stealth
Author of StealthBot

hismajesty

Quote from: UserLoser. on December 04, 2003, 06:41 PM
Are you correctly gettng the hwnd of Winamp?  AFAIK, Winamp has only released information on Winamp 1 and 2, maybe you're running a Winamp 3 or higher, and that's why it won't work? Do you have WM_USER correctly defined?

IIRC, the new Winamp version (5 I think) works with code made for earlier versions of Winamp. Yet, I don't think version three is compatible.

Banana fanna fo fanna

How about you learn vb first?

Trance

Quote from: hismajesty on December 05, 2003, 08:38 AM
Quote from: UserLoser. on December 04, 2003, 06:41 PM
Are you correctly gettng the hwnd of Winamp?  AFAIK, Winamp has only released information on Winamp 1 and 2, maybe you're running a Winamp 3 or higher, and that's why it won't work? Do you have WM_USER correctly defined?

IIRC, the new Winamp version (5 I think) works with code made for earlier versions of Winamp. Yet, I don't think version three is compatible.
Yes, Winamp 5 is based on 2.x. 3.x is totally different, and it sucks anyways so eh?

OuTLawZGoSu

Quote from: St0rm.iD on December 05, 2003, 10:17 PM
How about you learn vb first?

I can't understand that statement. Is there some training or code I neeed to make to "Know" Vb? How else will I learn?

I don't got MSDN. and Visual Basic for Dumies isn't realy the best traning book out there.





OuTLawZGoSu


R.a.B.B.i.T

the MSDN site is just MSDN hosted on the internet, the MSDN thats packed with VS is stored on ur harddrive