Link to home
Start Free TrialLog in
Avatar of degraef
degraef

asked on

Getting the volume and changing of volume

hi,

How do I get the Windows volume, for MasterVolume, Wav volume and Midi volume, and set it up so I can change it with a Slider, I think I will need to make use of Onformcreate and Onsliderchange

So the Code for
Procedure TForm1.onformcreate....
begin
Slider1.Max := ...
Slider1.min := ...
Slider1.Position := ...
end;

and for Sliderchange

Procedure TForm1.onslider1change...
begin
....
end;

Please make it cut and paste code as much as possible, and comment it. So I can follow.
Lot's of points so make it good.
ASKER CERTIFIED SOLUTION
Avatar of BoRiS
BoRiS

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BoRiS
BoRiS

here is another one to checkout also very good its form the delphideli

www.delphideli.com

then goto components and then audio its called volumes.zip

excellent

Later
BoRiS
Hi degraef,

For these things I use an excellent freeware component, it can change everything from volume to the balance ....

Look at there delphi pages :

http://web.access.net.au/%7Egchandle/

TVolumeControl: Want your own Win95 volume control in your applications? Then use this. And link it to the
        TBalanceControl component for a complete package. Control the Master, CD, Mic, Auxillary, Midi, Wave, Line-In volume
        levels.
       
        TBalanceControl: Link the balance control to the TVolumeControl to have your own volume and balance control package in
        your applications. Control the Master, CD, Mic, Auxillary, Midi, Wave, Line-In balance levels.

Offcourse, I haven't saw BoRiS components, so if they are better, please NOTIFY me about them.... (so I become also better of this question ;-) )

Regards, ZiF.
Avatar of degraef

ASKER

hi,

I downloaded the volumes.zip, haven't looked at it yet, but I suspect it is a slider.
The GrabBag which zifnab suggested I already have.
I should explain I am using the Rxslider from the rxlibrary, because I use a futuristic display I cannot use those W95 looking sliders, with the Rxslider I can choose the layout of the slider with pictures, so I need to use it. I tried linking the rxslider with the volumecontrol from the grabbag but that didn't work, I'll check out the volumes.zip and try the code suggested, will keep you updated
Avatar of degraef

ASKER

No, on both accounts. The volumes.zip requires a trackbar and does not work with rxSlider. Besides it did not have a master volume

And the code, it didn't do anything except with the sliders, they moved together, that is not what I need.

Better ideas please
degraef

The reason for the code was to show you how to get the volume and set the volume

I have edited the volumes.zip and allowed it accept the rxslider and master volume controls etc.

So I'm sure you can do the same, the component comes with the source just add what you need and recompile it...

any problems let me know

Later
BoRiS
Avatar of degraef

ASKER

I havent got a clue how to make a component, let alone change it. The point of me giving 500 points was that someone could give me an example of how to do it. So If you have already made it, then please post the edited pas file here.
I tell you what give me your mail address and i'll mail it you with a description on what is happening...

Then we can grade the answer...

Later
BoRiS
Avatar of degraef

ASKER

E-Mail = bs130956@skynet.be

Thanks, if it works, it will be worth it.
K will send it you

Later
BoRiS
hi all, if you still got problems tomorrow, I'm willing to make a working piece for you. But I guess BoRiS source code will work just fine. Regards, ZiF.
Avatar of degraef

ASKER

At the moment, I am unable to install the new volumes.dcu, because it is compiled under a different version of rxslider, so i'm still waiting, no pressure take your time to make it. :-)
degaef

K I'll check it out, what version of the Rx lib are you using, O I'll change the name to I checkout the the component Zifnab suggested (hmmmm, not bad) but I see they use a volumes unit to.

Well I'll mail you the new Now-Now

Later
BoRiS