M
mp
from Windows Sdk sample:
...\Microsoft
SDKs\Windows\v7.0\Samples\multimedia\WMP\dotNet\csharp\WMPCSharp.csproj
in a windows media player sample a slider (trackbar) is used to change
current position
it jumps farther at a time than i want when moved with mouse
anyone know how to adjust the increments of movement with mouse or arrow
keys?
the comments say sensitivity is hardcoded at 100
/// The trackbar has a fixed resolution of 100 ticks.
I don't know if that means in the code or the control itself is limited to
that?
here is a snip out of the sample
private void InitializeComponent()
{
.....
this.tbSeek = new System.Windows.Forms.TrackBar();
////// from the help: The key properties of the TrackBar control are Value,
TickFrequency, Minimum, and Maximum.
/// i tried messing with the following but they seem to not provide the
desired result
this.tbSeek.SmallChange = 1;
this.tbSeek.LargeChange = 10;
this.tbSeek.TickFrequency = 1;
//in the scroll event...
private void tbSeek_Scroll(object sender, System.EventArgs e)
{
try
{
if(Player.currentMedia.duration != 0)
{//how to make the slider more sensitivce so you can change one second at a
time ????
double newPerc = Convert.ToDouble(tbSeek.Value) / 100; // <--------- should
this change the increment??? i tried 10 and 1000 but they don't seem to do
the trick???
int duration = Convert.ToInt32(Player.currentMedia.duration * 1000); //
milliseconds
double newPos = (duration * newPerc)/1000; // seconds
// Seek the Player
Player.Ctlcontrols.currentPosition = newPos;
}
thanks for any tips
mark
...\Microsoft
SDKs\Windows\v7.0\Samples\multimedia\WMP\dotNet\csharp\WMPCSharp.csproj
in a windows media player sample a slider (trackbar) is used to change
current position
it jumps farther at a time than i want when moved with mouse
anyone know how to adjust the increments of movement with mouse or arrow
keys?
the comments say sensitivity is hardcoded at 100
/// The trackbar has a fixed resolution of 100 ticks.
I don't know if that means in the code or the control itself is limited to
that?
here is a snip out of the sample
private void InitializeComponent()
{
.....
this.tbSeek = new System.Windows.Forms.TrackBar();
////// from the help: The key properties of the TrackBar control are Value,
TickFrequency, Minimum, and Maximum.
/// i tried messing with the following but they seem to not provide the
desired result
this.tbSeek.SmallChange = 1;
this.tbSeek.LargeChange = 10;
this.tbSeek.TickFrequency = 1;
//in the scroll event...
private void tbSeek_Scroll(object sender, System.EventArgs e)
{
try
{
if(Player.currentMedia.duration != 0)
{//how to make the slider more sensitivce so you can change one second at a
time ????
double newPerc = Convert.ToDouble(tbSeek.Value) / 100; // <--------- should
this change the increment??? i tried 10 and 1000 but they don't seem to do
the trick???
int duration = Convert.ToInt32(Player.currentMedia.duration * 1000); //
milliseconds
double newPos = (duration * newPerc)/1000; // seconds
// Seek the Player
Player.Ctlcontrols.currentPosition = newPos;
}
thanks for any tips
mark