Solved

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

Posted on 2010-09-02
6
485 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
[X]
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
  • 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
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.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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