Valhalla Legends Forums Archive | Visual Basic Programming | Winamp volume help.

AuthorMessageTime
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?
December 4, 2003, 11:29 PM
Stealth
First off, waclass doesn't appear to be used in your code, so there's no reason to pass it.

Offhand:

[code]
Private Sub cmdWinampVolumeMax_Click()
Call Volume(255) 'or (255, "")
End Sub
[/code]

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.
December 4, 2003, 11:47 PM
OuTLawZGoSu
[quote author=Stealth link=board=31;threadid=4078;start=0#msg33702 date=1070581667]
First off, waclass doesn't appear to be used in your code, so there's no reason to pass it.
[/quote]

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

[/code]

EDIT: Hmmmm..... Now it doesn't do anything after I added: "Public RetVal As Long" to the module.
December 4, 2003, 11:56 PM
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?
December 5, 2003, 12:41 AM
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?
December 5, 2003, 4:00 AM
hismajesty
[quote author=UserLoser. link=board=31;threadid=4078;start=0#msg33722 date=1070584876]
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?
[/quote]

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.
December 5, 2003, 2:38 PM
St0rm.iD
How about you learn vb first?
December 6, 2003, 4:17 AM
Trance
[quote author=hismajesty link=board=31;threadid=4078;start=0#msg33812 date=1070635123]
[quote author=UserLoser. link=board=31;threadid=4078;start=0#msg33722 date=1070584876]
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?
[/quote]

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.
[/quote]
Yes, Winamp 5 is based on 2.x. 3.x is totally different, and it sucks anyways so eh?
December 10, 2003, 4:50 PM
OuTLawZGoSu
[quote author=St0rm.iD link=board=31;threadid=4078;start=0#msg33892 date=1070684248]
How about you learn vb first?
[/quote]

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.

December 19, 2003, 6:30 PM
hismajesty
[quote author=OuTLawZGoSu link=board=31;threadid=4078;start=0#msg36376 date=1071858654]
I don't got MSDN.
[/quote]
Eh? Everyone has MSDN! http://msdn.microsoft.com
December 19, 2003, 7:44 PM
UserLoser.
[quote author=hismajesty link=board=31;threadid=4078;start=0#msg36378 date=1071863088]
[quote author=OuTLawZGoSu link=board=31;threadid=4078;start=0#msg36376 date=1071858654]
I don't got MSDN.
[/quote]
Eh? Everyone has MSDN! http://msdn.microsoft.com
[/quote]

Microsoft has that, you use that
December 19, 2003, 10:27 PM
hismajesty
[quote author=UserLoser. link=board=31;threadid=4078;start=0#msg36401 date=1071872847]
[quote author=hismajesty link=board=31;threadid=4078;start=0#msg36378 date=1071863088]
[quote author=OuTLawZGoSu link=board=31;threadid=4078;start=0#msg36376 date=1071858654]
I don't got MSDN.
[/quote]
Eh? Everyone has MSDN! http://msdn.microsoft.com
[/quote]

Microsoft has that, you use that
[/quote]

:P
December 19, 2003, 11:24 PM
OuTLawZGoSu
[quote author=hismajesty link=board=31;threadid=4078;start=0#msg36378 date=1071863088]
[quote author=OuTLawZGoSu link=board=31;threadid=4078;start=0#msg36376 date=1071858654]
I don't got MSDN.
[/quote]
Eh? Everyone has MSDN! http://msdn.microsoft.com
[/quote]

Aint the help on vb msdn diffent then the msdn site?
December 21, 2003, 8:36 PM
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
January 2, 2004, 9:56 PM

Search