Solved

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

Posted on 2010-09-02
6
473 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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 to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now