Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: OuTLawZGoSu on December 04, 2003, 05:29 PM

Title: Winamp volume help.
Post by: OuTLawZGoSu on December 04, 2003, 05:29 PM
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?
Title: Re:Winamp volume help.
Post by: 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.

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.
Title: Re:Winamp volume help.
Post by: OuTLawZGoSu on December 04, 2003, 05:56 PM
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.
Title: Re:Winamp volume help.
Post by: 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?
Title: Re:Winamp volume help.
Post by: Stealth on December 04, 2003, 10:00 PM
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?
Title: Re:Winamp volume help.
Post by: 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.
Title: Re:Winamp volume help.
Post by: Banana fanna fo fanna on December 05, 2003, 10:17 PM
How about you learn vb first?
Title: Re:Winamp volume help.
Post by: Trance on December 10, 2003, 10:50 AM
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?
Title: Re:Winamp volume help.
Post by: OuTLawZGoSu on December 19, 2003, 12:30 PM
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.

Title: Re:Winamp volume help.
Post by: 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
Title: Re:Winamp volume help.
Post by: UserLoser. on December 19, 2003, 04:27 PM
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

Microsoft has that, you use that
Title: Re:Winamp volume help.
Post by: hismajesty on December 19, 2003, 05:24 PM
Quote from: UserLoser. on December 19, 2003, 04:27 PM
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

Microsoft has that, you use that

:P
Title: Re:Winamp volume help.
Post by: OuTLawZGoSu on December 21, 2003, 02:36 PM
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?
Title: Re:Winamp volume help.
Post by: R.a.B.B.i.T on January 02, 2004, 03:56 PM
the MSDN site is just MSDN hosted on the internet, the MSDN thats packed with VS is stored on ur harddrive