Click here to Skip to main content
16,006,605 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem with Paint Pin
Stanciu Vlad23-Nov-05 6:57
Stanciu Vlad23-Nov-05 6:57 
QuestionListview drag drop and Ghost icon issue Pin
sameerhanda23-Nov-05 4:09
sameerhanda23-Nov-05 4:09 
AnswerRe: Listview drag drop and Ghost icon issue Pin
Curtis Schlak.23-Nov-05 12:12
Curtis Schlak.23-Nov-05 12:12 
QuestionPlease help with problem – multiple audio file playback(c#) Pin
truly_pringled23-Nov-05 4:03
truly_pringled23-Nov-05 4:03 
GeneralRe: Please help with problem – multiple audio file playback(c#) Pin
mav.northwind23-Nov-05 4:25
mav.northwind23-Nov-05 4:25 
QuestionRe: Please help with problem – multiple audio file playback(c#) Pin
truly_pringled23-Nov-05 5:32
truly_pringled23-Nov-05 5:32 
AnswerRe: Please help with problem – multiple audio file playback(c#) Pin
Dave Kreskowiak23-Nov-05 5:44
mveDave Kreskowiak23-Nov-05 5:44 
AnswerRe: Please help with problem – multiple audio file playback(c#) Pin
truly_pringled24-Nov-05 3:48
truly_pringled24-Nov-05 3:48 
GOT IT WORKING!

Thank you mav & dave.

the code i used is below:-

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices; // for PlaySound()
using Microsoft.Win32; // RegistryKey

namespace WindowsApplication2
{
///
/// Summary description for Form1.
///

public class Form1 : System.Windows.Forms.Form
{

[DllImport("winmm.dll", SetLastError=true)]
static extern bool PlaySound(string pszSound,
System.UIntPtr hmod, uint fdwSound);

[Flags]
public enum SoundFlags : int
{
SND_SYNC = 0x0000, // play synchronously (default)
SND_ASYNC = 0x0001, // play asynchronously
SND_NODEFAULT = 0x0002, // silence (!default) if sound not found
SND_MEMORY = 0x0004, // pszSound points to a memory file
SND_LOOP = 0x0008, // loop the sound until next sndPlaySound
SND_NOSTOP = 0x0010, // don't stop any currently playing sound
SND_NOWAIT = 0x00002000, // don't wait if the driver is busy
SND_ALIAS = 0x00010000, // name is a registry alias
SND_ALIAS_ID = 0x00110000, // alias is a predefined id
SND_FILENAME = 0x00020000, // name is file name
SND_RESOURCE = 0x00040004 // name is resource name or atom
}

private System.Windows.Forms.Button button1;
///
/// Required designer variable.
///

private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(48, 56);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(176, 72);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);

}
#endregion

///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.Run(new Form1());
}

public static void Play (string strFileName)
{
PlaySound (strFileName, UIntPtr.Zero, (uint)(SoundFlags.SND_FILENAME | SoundFlags.SND_SYNC));
}

private void button1_Click(object sender, System.EventArgs e)
{

string strFileName1 = "1.wav";
string strFileName2 = "2.wav";

Play(strFileName1);
Play(strFileName2);

}
}
}
QuestionSystem.Resources.MissingManifestResourceException Pin
Dan Neely23-Nov-05 3:50
Dan Neely23-Nov-05 3:50 
AnswerRe: System.Resources.MissingManifestResourceException Pin
Dan Neely23-Nov-05 5:32
Dan Neely23-Nov-05 5:32 
QuestionConditional Installation of merge module? Pin
mav.northwind23-Nov-05 3:38
mav.northwind23-Nov-05 3:38 
Questionuser interface standards Pin
rmedo23-Nov-05 3:03
rmedo23-Nov-05 3:03 
AnswerRe: user interface standards Pin
Dan Neely23-Nov-05 4:23
Dan Neely23-Nov-05 4:23 
AnswerRe: user interface standards Pin
Not Active23-Nov-05 5:54
mentorNot Active23-Nov-05 5:54 
QuestionUI control hot key (Alt+?) Pin
smurfy3423-Nov-05 2:56
smurfy3423-Nov-05 2:56 
AnswerRe: UI control hot key (Alt+?) Pin
Dan Neely23-Nov-05 3:56
Dan Neely23-Nov-05 3:56 
GeneralRe: UI control hot key (Alt+?) Pin
smurfy3423-Nov-05 4:16
smurfy3423-Nov-05 4:16 
AnswerRe: UI control hot key (Alt+?) Pin
Dr. Spack23-Nov-05 9:40
Dr. Spack23-Nov-05 9:40 
GeneralRe: UI control hot key (Alt+?) Pin
Dr. Spack23-Nov-05 9:45
Dr. Spack23-Nov-05 9:45 
QuestionXML WYSIWYG Pin
Gktony23-Nov-05 1:33
Gktony23-Nov-05 1:33 
Questionvb to C#.Net Pin
Ankit Aneja23-Nov-05 0:45
Ankit Aneja23-Nov-05 0:45 
AnswerRe: vb to C#.Net Pin
User 665823-Nov-05 1:41
User 665823-Nov-05 1:41 
GeneralRe: vb to C#.Net Pin
Ankit Aneja23-Nov-05 1:52
Ankit Aneja23-Nov-05 1:52 
AnswerRe: vb to C#.Net Pin
anandss23-Nov-05 9:03
anandss23-Nov-05 9:03 
GeneralRe: vb to C#.Net Pin
Ankit Aneja23-Nov-05 18:50
Ankit Aneja23-Nov-05 18:50 

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.