Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

C# windows app simulate writting with delay function and background music

Posted on 2010-09-02
6
481 Views
Last Modified: 2012-05-10
HEJ EXPERTS :),

I want to build something like the following:

-A windows app that has a string let say 30 lines (reading from a file)
-outputting strings  to screen with a picture (that i can have path saved in string so no issue)
.Question is how I can SIMULATE powerpoint like writting by printing out character by character OR if this is very complicated i can stick to ONE LINE per go but there should be a delay between lines. PLEASE Help how to achieve this.
-I want to have a background music (one file) throughout the execution of the application. (I think it is something to do with threading)
Please help in achieving the above. Thanks
0
Comment
Question by:hussainAbid
  • 3
  • 3
6 Comments
 
LVL 9

Accepted Solution

by:
puru1981 earned 500 total points
ID: 33584820
you can use a stream reader to read from the file using buffer
after each read you can make a delay using sleep(3000) fro 3 seconds and write the stream to the box area as per your choice(character by character or line by line).

For the playing of music you can use timer to reset when the music file ends.
0
 

Author Comment

by:hussainAbid
ID: 33584848
Thanks, puru 1981,
I realised you made it pretty simple for me i dint think it was this simple BUT can you also please help with music file thing. Do i need a thread and/or how to run that file in the background. Any example code/link will be a GREATTTTT help :)
 
0
 
LVL 9

Expert Comment

by:puru1981
ID: 33584924
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 9

Expert Comment

by:puru1981
ID: 33585038
you can use PlayLooping Method instead of Play no need to use timer.
0
 

Author Comment

by:hussainAbid
ID: 33585051
Puru You are a Champ man ..
0
 

Author Closing Comment

by:hussainAbid
ID: 33585055
EXCELLENT HELP
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question