Solved

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

Posted on 2010-09-02
6
480 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

809 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