使用C# Form 简单的实现了弹幕效果
1.创建一个Form 设置
2.添加一个计时器
3. 代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Text;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DanMu
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Rectangle rec = Screen.GetWorkingArea(this);
this.Height = rec.Height / 3 * 2; // 3分之2
this.Width = rec.Width;
this.Location = new Point(0, 0);