Click here to Skip to main content
16,005,080 members
Home / Discussions / C#
   

C#

 
GeneralRe: Integrating the Media Player Pin
Yonaz18-Jul-04 6:59
Yonaz18-Jul-04 6:59 
GeneralRe: Integrating the Media Player Pin
polomint18-Jul-04 8:22
polomint18-Jul-04 8:22 
GeneralRe: Integrating the Media Player Pin
Yonaz18-Jul-04 8:56
Yonaz18-Jul-04 8:56 
GeneralRe: Integrating the Media Player Pin
Anonymous18-Jul-04 10:22
Anonymous18-Jul-04 10:22 
GeneralRe: Integrating the Media Player Pin
polomint18-Jul-04 10:33
polomint18-Jul-04 10:33 
GeneralRe: Integrating the Media Player Pin
Yonaz19-Jul-04 22:44
Yonaz19-Jul-04 22:44 
GeneralAudio volume control in c# Pin
Don60317-Jul-04 12:06
Don60317-Jul-04 12:06 
GeneralRe: Audio volume control in c# Pin
mav.northwind17-Jul-04 21:19
mav.northwind17-Jul-04 21:19 
You could use a TrackBar derived control for this.
Try this code, it works yet leaves room for you to play with:
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
 
public class VolumeControl : TrackBar
{
  [DllImport("winmm.dll")]
  private static extern int waveOutSetVolume(IntPtr device, UInt32 vol);
 
  public VolumeControl()
  {
    base.Minimum = 0;
    base.Maximum = 0xffff; // Left & right volume is 16bit each
    base.TickFrequency = 4096;
    base.SmallChange = 4096;
    base.LargeChange = 8192;

    this.ValueChanged += new EventHandler(VolumeControl_ValueChanged);
  }
 
  private void VolumeControl_ValueChanged(object sender, EventArgs e)
  {
    // Left volume in lower 16bit, right volume in upper 16bit
    // IntPtr.Zero => Default Device/Master volume
    waveOutSetVolume(IntPtr.Zero, (uint)(Value|Value<<16));
  }
}


Regards,
mav
GeneralRe: Audio volume control in c# Pin
Don60318-Jul-04 9:18
Don60318-Jul-04 9:18 
GeneralRe: Audio volume control in c# Pin
mav.northwind18-Jul-04 21:43
mav.northwind18-Jul-04 21:43 
GeneralQuestion in DataGrid Pin
ImanMahmoud17-Jul-04 9:15
ImanMahmoud17-Jul-04 9:15 
GeneralRe: Question in DataGrid Pin
MADHANMOHAN18-Jul-04 17:46
MADHANMOHAN18-Jul-04 17:46 
GeneralHey GDI people Pin
Alex Korchemniy17-Jul-04 9:08
Alex Korchemniy17-Jul-04 9:08 
GeneralRe: Hey GDI people Pin
SJ_Phoenix17-Jul-04 11:53
SJ_Phoenix17-Jul-04 11:53 
QuestionSuggestions for Forum Replyer? Pin
j1e1g117-Jul-04 7:45
j1e1g117-Jul-04 7:45 
AnswerRe: Suggestions for Forum Replyer? Pin
j1e1g117-Jul-04 9:19
j1e1g117-Jul-04 9:19 
GeneralRe: Suggestions for Forum Replyer? Pin
Serge Lobko-Lobanovsky19-Jul-04 0:43
Serge Lobko-Lobanovsky19-Jul-04 0:43 
GeneralReading Outlook PST files Pin
bergetun17-Jul-04 4:36
bergetun17-Jul-04 4:36 
GeneralRe: Reading Outlook PST files Pin
Ray Cassick17-Jul-04 8:53
Ray Cassick17-Jul-04 8:53 
GeneralRe: Reading Outlook PST files Pin
Dave Kreskowiak17-Jul-04 9:37
mveDave Kreskowiak17-Jul-04 9:37 
GeneralRe: Reading Outlook PST files Pin
bergetun17-Jul-04 23:35
bergetun17-Jul-04 23:35 
GeneralRe: Reading Outlook PST files Pin
Nick Parker18-Jul-04 5:32
protectorNick Parker18-Jul-04 5:32 
GeneralRe: Reading Outlook PST files Pin
Dave Kreskowiak18-Jul-04 9:07
mveDave Kreskowiak18-Jul-04 9:07 
GeneralRe: Reading Outlook PST files Pin
bergetun18-Jul-04 12:01
bergetun18-Jul-04 12:01 
GeneralWaitCursor Pin
Member 93716116-Jul-04 20:46
Member 93716116-Jul-04 20:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.