-
Jun 27th, 2008, 05:35 AM
#1
Thread Starter
New Member
Vista Master Volume Level - how to get it?
Hi there. This is my first thread and i hope i put it in the right place. Here is my question:
I have an application written in VB 2005 and i want to find out what's the master volume level (in Windows Vista) at a particular time. I found something on the web, but it's written in C language and I am not familiar with it. Can anyone help me?
Thanks!
-
Nov 10th, 2008, 04:56 AM
#2
New Member
Re: Vista Master Volume Level - how to get it?
I recently had this problem when trying to make a remote control circuit to control my PC volume and other functions... It seems that most code for vb which achieves this goal is unsuccessful because it just gives you local application volume control!
Being more of a C++ programmer myself I actually used some suggestions from various sites to build a simple DLL that I could call from vb (attached). I don't think it will work for XP but it worked on my Vista system...
To Call:
VBCode Code:
Private Declare Function GetVolume Lib "SystemHWInterface.dll" () As Double
Private Declare Sub SetVolume Lib "SystemHWInterface.dll" (ByVal volume As Double)
'Get volume
Dim dVolumeLevel As Double
dVolumeLevel = GetVolume()
'Set volume to 50%
SetVolume(0.5)
Note that it gives you control of the master volume as a percentage.
Hope this helps some of you guys out!
Last edited by si_the_geek; Mar 4th, 2009 at 05:57 PM.
Reason: removed attachment (just an executable file)
-
Feb 24th, 2009, 06:49 PM
#3
New Member
Re: Vista Master Volume Level - how to get it?
Hi.
That was very good library. Does it have any Mute functions?
-
Apr 27th, 2009, 11:28 AM
#4
New Member
Re: Vista Master Volume Level - how to get it?
Last edited by si_the_geek; Mar 4th, 2009 at 04:57 PM. Reason: removed attachment (just an executable file)
Seems like a handy DLL - any particular reason why it's been removed? I have been searching for something just like this!
-
Apr 27th, 2009, 12:41 PM
#5
Re: Vista Master Volume Level - how to get it?
Originally Posted by Radian
Seems like a handy DLL - any particular reason why it's been removed? I have been searching for something just like this!
I think the main reason is the poster is not known, only has 1 post, hard to trust, and most programming sites don't allow or want you to post compiled code.
-
Apr 27th, 2009, 02:35 PM
#6
New Member
Re: Vista Master Volume Level - how to get it?
OK, thanks Edgemeal - it did half cross my mind that a DLL might be a dodgy item to take on trust. Now that this post has been bumped into view - is anyone able to advise on how to deal with the Vista mixer using VB?
-
Jun 30th, 2009, 12:41 PM
#7
New Member
Re: Vista Master Volume Level - how to get it?
Originally Posted by Radian
is anyone able to advise on how to deal with the Vista mixer using VB?
I would also need this, but could not find anything useful so far.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|