Click here to Skip to main content
13,201,452 members (73,797 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Make text effect (Karaoke effect) simalar this video
Happy new year
Posted 2-Jan-13 20:51pm
hochoint1.3K
Updated 26-Feb-17 0:08am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Let me Google[^] that for you!
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Maybe this will be helpfull for you:


using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
 
namespace KaraokeEditor
{
    public class KaraokeDrawer
    {
        PictureBox _pBox;
        public KaraokeDrawer(PictureBox pBox)
        {
            _pBox = pBox;
            _pBox.Paint += pictureBox1_Paint;
            _timer.Tick += Timer_Tick;
            _timer.Start();
        }
 
        Timer _timer = new Timer() {Enabled = true, Interval = 50};
        
        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            string text = "Hello World!";
            var path = new GraphicsPath();
            path.AddString(text, new FontFamily("Arial"), (int)FontStyle.Regular, 50, new Point(10, 10), StringFormat.GenericDefault);
            e.Graphics.FillPath(new SolidBrush(Color.White), path);
 
            Region r = new Region(path);
            RectangleF rect = r.GetBounds(e.Graphics);
            RectangleF intersectRect = new RectangleF(rect.X, rect.Y, rect.Width * _percent / 100, rect.Height);
            r.Intersect(intersectRect);
            e.Graphics.FillRegion(Brushes.Red, r);
 
            e.Graphics.DrawPath(new Pen(Color.Blue), path);
        }
        
 
        int _percent = 0;
        private void Timer_Tick(object sender, EventArgs e)
        {
            ++_percent;
            _pBox.Invalidate();
            if (_percent >= 100)
            {
                _timer.Stop();
            }
 
        }
    }
}
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web03 | 2.8.171020.1 | Last Updated 26 Feb 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100