C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






The Quiz


Posted Date:     Total Responses: 0    Posted By: Veerabagu   Member Level: Gold   Points/Cash: 50   


this game is very interesting for beginners to know more about winforms. the main important feature is i added my own voice while generating new questions.

New things what i learned :

1) how to add audio in windows based application
2) how to run 2 audio files synchronously

1) how to add audio in windows based application:

Using System.Media class we add easily audio in our windows application.They are two types to add audio in our application.

1.From Resources
2.From Hard Disk

1) From Resources:

First add the add the audio file in Resources the type the following 2 line of code in button click event or any event

Code:

System.Media.SoundPlayer sound = new System.Media.SoundPlayer();
sound.Stream = Properties.Resources.Veera_Ava_Enna;
sound.PlayLooping();

2) From Hard Disk:
If already audio file exists in hard disk we have to use the following 2 line of code

Code:

System.Media.SoundPlayer sound = new System.Media.SoundPlayer();
sound.SoundLocation = @”D:\veera\Veera – Ava Enna.wav”;
sound.Play();
For stop the audio:
sound.Stop();

2) how to run 2 audio files synchronously

if you want to run two audio file synchronously you have to use audio.PlaySync(); function. Without using this function it will directly run the second file try once if you are free.

for example:

audio = new System.Media.SoundPlayer kaunBanegaCrorepati.Properties.Resources.weight);
audio.Play();
audio.PlaySync();
audio = new System.Media.SoundPlayer(kaunBanegaCrorepati.Properties.Resources.intro);
audio.Play();


Attachments

  • The Quiz (567-4431-theQuiz.zip)

  • Project Feedbacks

    Author: sundar PMember Level: BronzeRevenue Score: 5 out of 55 out of 55 out of 55 out of 55 out of 5
    sir am sundar at psy engineering college at sivaganga...
    am a middle class family...i want to do my project in .net,
    but am not having basic idea about my project...
    please help me...you will send the overall source code and forms and their ideas
    to my mail....
    please you will guide me...
    Email ID:sundar.webdev@gmail.com


    please help me....
    my future is your wish....

    regards


    SUNDAR.P





    Author: mohd farhanMember Level: BronzeRevenue Score: 1 out of 5
    hi i m very happy, thanx a lot of sir........


    Author: govindarajanMember Level: BronzeRevenue Score: 3 out of 53 out of 53 out of 5
    Sir, I have a doubt in c#.net
    when the form is displayed using stopwatch i want the form to be automatically closed after some specified amount of time.so, please give me the code for this.

    Thanks
    Govindarajan.


    Author: HymaMember Level: BronzeRevenue Score: 1 out of 5
    Hi,
    May i know how its working in detail example..


    Author: HymaMember Level: BronzeRevenue Score: 1 out of 5
    Hi,
    May i know how its working in detail example..


    Author: HymaMember Level: BronzeRevenue Score: 1 out of 5
    Hi,
    May i know how its working in detail example..


    Author: SaravananMember Level: BronzeRevenue Score: 1 out of 5
    Hi,
    Can you explain in detail how its working.

    -Saravanan


    Author: SaravananMember Level: BronzeRevenue Score: 1 out of 5
    Hi,
    Can you explain in detail how its working.

    -Saravanan


    Author: siriMember Level: SilverRevenue Score: 3 out of 53 out of 53 out of 5
    Hi,
    I wish to use this project and iam unable to figure out how to get this program working. if you can put in some help describing how we can use the application it can be helpful to new bies like me
    thanks
    siri


    Author: siriMember Level: SilverRevenue Score: 3 out of 53 out of 53 out of 5
    Hi,
    I wish to use this project and iam unable to figure out how to get this program working. if you can put in some help describing how we can use the application it can be helpful to new bies like me
    thanks
    siri


    Author: VeerabaguMember Level: GoldRevenue Score: 4 out of 54 out of 54 out of 54 out of 5
    Hi all its a quiz program i am displaying 10 questions one by one.
    then while loading i am generating some music and each questions i am using my
    own voice while generating the questions.

    once download and execute the code you come to understand easily
    the main concept is how we play audio in windows application synchronous and asynchronous manner

    any doubt reply :)

    Regards
    Veera


    Post Feedback
    You must Sign In to post a feedback.
    Next Project: The Dice
    Previous Project: Export Grid to Excel

    Return to Project Index

    Post New Project


    Related Projects



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use