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

C#

 
GeneralRe: Startup Editor Pin
DigitalKing26-Jan-06 6:23
DigitalKing26-Jan-06 6:23 
QuestionObject Binding Question Pin
akyriako7825-Jan-06 23:51
akyriako7825-Jan-06 23:51 
QuestionType of disc in CD/DVD drive Pin
MajorPaul25-Jan-06 23:25
MajorPaul25-Jan-06 23:25 
AnswerRe: Type of disc in CD/DVD drive Pin
Dave Kreskowiak26-Jan-06 6:36
mveDave Kreskowiak26-Jan-06 6:36 
GeneralRe: Type of disc in CD/DVD drive Pin
MajorPaul27-Jan-06 2:20
MajorPaul27-Jan-06 2:20 
QuestionPlay sound Pin
mehrdadc4825-Jan-06 23:06
mehrdadc4825-Jan-06 23:06 
AnswerRe: Play sound Pin
idreesbadshah26-Jan-06 4:01
idreesbadshah26-Jan-06 4:01 
AnswerRe: Play sound Pin
snouto26-Jan-06 4:36
snouto26-Jan-06 4:36 
hello my friend if you want to play sound when the alarm notifies you , you have first to create an event for your own second to interlop win32 function for playing sound files you can use that easily from directx but i will assume that you don't have directX namespaces so open your mind now and follow me in the code below

<br />
//first create your event by the following steps<br />
//initialize your own delegate<br />
namespace yourprogram<br />
{<br />
..<br />
..<br />
..<br />
public void delegate mydelegate (object sender , EventArgs e);<br />
.<br />
.<br />
..<br />
public class yourprogram<br />
{<br />
//Place here your Api constants <br />
private const int SND_filename = 0x00020000;<br />
private const int SND_Async = 0x0001;<br />
//interlop here your function<br />
[DllImport("winmm.dll")]<br />
public static extern void PlaySound(string filename , int api_constant_1 , int Api_constant_2);<br />
....<br />
...<br />
..<br />
public event mydelegate myevent;<br />
<br />
//then in your method of your alarm that will notify you throw your event there on the action you expect from your<br />
//alarm like the following<br />
myalarm.NotifyMe();<br />
myevent(this,new EventArgs());<br />
...<br />
...<br />
..<br />
//then in your method of the event create that method and <br />
//place your PlaySound function from win32 functions<br />
//that we just interlop it above in that method like<br />
// the following<br />
Private void myeventmethod(object sender , EventArgs e)<br />
{<br />
//play your sound here<br />
PlaySound("your file path to .Wav File",0,D_filename | SND_Async);<br />
}<br />
//then in your class or the event load of the form you can <br />
//place that code here<br />
myprogramclass.myevent += new myDelegate(myeventmethod);<br />


I hope this will do the work

Mess With The Best And Die Like The Rest
QuestionHow to implement IEnumerator with generics? Pin
t800t825-Jan-06 21:45
t800t825-Jan-06 21:45 
AnswerRe: How to implement IEnumerator with generics? Pin
t800t825-Jan-06 21:50
t800t825-Jan-06 21:50 
QuestionCrystal Reports Pin
shreya@work25-Jan-06 20:51
shreya@work25-Jan-06 20:51 
AnswerRe: Crystal Reports Pin
| Muhammad Waqas Butt |25-Jan-06 22:28
professional| Muhammad Waqas Butt |25-Jan-06 22:28 
GeneralRe: Crystal Reports Pin
shreya@work26-Jan-06 4:15
shreya@work26-Jan-06 4:15 
GeneralRe: Crystal Reports Pin
| Muhammad Waqas Butt |27-Jan-06 4:26
professional| Muhammad Waqas Butt |27-Jan-06 4:26 
QuestionControl events list Pin
NewbieDude25-Jan-06 20:39
NewbieDude25-Jan-06 20:39 
AnswerRe: Control events list Pin
James Gupta25-Jan-06 21:05
professionalJames Gupta25-Jan-06 21:05 
GeneralRe: Control events list Pin
NewbieDude25-Jan-06 21:11
NewbieDude25-Jan-06 21:11 
QuestionHow do I collapse / expand methods Pin
NewbieDude25-Jan-06 19:24
NewbieDude25-Jan-06 19:24 
AnswerRe: How do I collapse / expand methods Pin
DigitalKing25-Jan-06 19:39
DigitalKing25-Jan-06 19:39 
AnswerRe: How do I collapse / expand methods Pin
Gowdhaman.R4-Mar-09 23:06
Gowdhaman.R4-Mar-09 23:06 
QuestionHow to take input from mic? Pin
Divyang Mithaiwala25-Jan-06 19:15
Divyang Mithaiwala25-Jan-06 19:15 
QuestionTrying to convert RTF &#305;nto plain text Pin
Tugbay Sahin25-Jan-06 15:13
Tugbay Sahin25-Jan-06 15:13 
AnswerRe: Trying to convert RTF &#305;nto plain text Pin
DigitalKing25-Jan-06 19:07
DigitalKing25-Jan-06 19:07 
QuestionTo Serialize COM structures in C# Pin
chervu25-Jan-06 15:01
chervu25-Jan-06 15:01 
Questionface recognition Pin
maf3os25-Jan-06 12:36
maf3os25-Jan-06 12:36 

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.