Author Topic: volume bar in windows 7  (Read 5226 times)

bugmenot

  • Guest
Hi should be nice to add volume bar to quick set volume level from "quick window" that appear when onmouseover to bar from task bar.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
instead of showing the track information and picture?
If so i didnt think the windows 7 api allowed anything more than having buttons that you can click (i guess i could have a volume up and volume down button) but have you seen something someone else has done with a volume scroll bar from the win7 taskbar?

bugmenot

  • Guest
I think slider, maybe buttons should be fine ( presets or very rough - 10% ), mute button is good idea too.

boroda

  • Sr. Member
  • ****
  • Posts: 4622
Hi Steven. May be it is possible to catch not only left click mouse event but also mouse wheel events over buttons in preview window? Then you may add one 'volume button' which will mute/unmute sound on clicking and change volume on wheel scroll.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
its a good idea but at the moment i'm not sure whether the windows 7 api allows you to capture mouse events over the preview window - i didnt think it did but if you have seen someone else implement such a thing please let me know. I believe you can only set up buttons that can be clicked

boroda

  • Sr. Member
  • ****
  • Posts: 4622
One more idea about volume control in preview window. May be you can add a number of partially overlapping buttons, one for the certain volume level, so that only one one button at a time is visible? This should look like simulation of slider. But this slider would be only clickable, not dragable.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
unfortunately the windows api for the preview picture is very restrictive and you can only make buttons visible or not, and capture them being clicked but its windows that places the location of the buttons. I dont know why they dont allow mouse events to be captured as that would be very useful.

boroda

  • Sr. Member
  • ****
  • Posts: 4622
I think you didn't understand me, Steven. The last idea requires nothing but clickable buttons for simulation of slider. It is just a row of narrow buttons (may be placed over passive line - this line is just a picture). All of the buttons are active and clickable, but only one is visible (visible is button that corresponds to current volume level). If windows 7 API doesn't allow invisible buttons to be clickable,  then you may use transparent textures for providing "invisibility". Of course this "slider" can't be dragged (as we use only clickable buttons). But this "slider" can be clicked at given volume level (actually on one of the invisible buttons) to quickly set up volume.

P.S. May be invisibility of buttons is not even needed. You may simply use one texture for "current volume" button and another texture for other buttons.
Last Edit: July 13, 2010, 11:55:20 AM by boroda74

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
i think some of button area cannot be controlled and you can only associate an image with the centre part of the button. Also anything more than a couple of buttons will clutter the window.
Anyway when i come to look at this i'll see if there is a way to capture mouse events so you can scroll the wheel which sounds the best way of doing this.