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?
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 (http://www.winamp.com/nsdn/) should have plenty of info.
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.
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?
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?
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.
How about you learn vb first?
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?
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.
Quote from: OuTLawZGoSu on December 19, 2003, 12:30 PM
I don't got MSDN.
Eh? Everyone has MSDN! http://msdn.microsoft.com
Quote from: hismajesty on December 19, 2003, 01:44 PM
Quote from: OuTLawZGoSu on December 19, 2003, 12:30 PM
I don't got MSDN.
Eh? Everyone has MSDN! http://msdn.microsoft.com
Aint the help on vb msdn diffent then the msdn site?
the MSDN site is just MSDN hosted on the internet, the MSDN thats packed with VS is stored on ur harddrive