滚动字幕(C#)会的快进来 csdn 上搜了一圈 没有一个 关于怎么做 滚动字幕的 希望 做过的 能给我讲讲 怎么做 要是能吧你做的 类传上就更好了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用JavaScript就可以。网上有例子。 using System;using System.Collections;using System.ComponentModel;using System.Drawing;using System.Data;using System.Windows.Forms;namespace Caster{ /// <summary> /// MyMoveChar 的摘要说明。 /// </summary> public class MyMoveChar : System.Windows.Forms.UserControl { private System.Windows.Forms.Timer timer; private System.Windows.Forms.Label label; private System.ComponentModel.IContainer components; public MyMoveChar() { // 该调用是 Windows.Forms 窗体设计器所必需的。 InitializeComponent(); timer.Tick+=new EventHandler(timer_Tick); // TODO: 在 InitializeComponent 调用后添加任何初始化 } /// <summary> /// 清理所有正在使用的资源。 /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region 组件设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器 /// 修改此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.label = new System.Windows.Forms.Label(); this.timer = new System.Windows.Forms.Timer(this.components); this.SuspendLayout(); // // label // this.label.AutoSize = true; this.label.Location = new System.Drawing.Point(320, 0); this.label.Name = "label"; this.label.Size = new System.Drawing.Size(0, 17); this.label.TabIndex = 0; // // timer // this.timer.Enabled = true; // // MyMoveChar // this.Controls.Add(this.label); this.Name = "MyMoveChar"; this.Size = new System.Drawing.Size(320, 32); this.ResumeLayout(false); } #endregion #region propertys public new System.Drawing.Size Size { get { return base.Size; } set { base.Size=value; label.Location= new System.Drawing.Point(label.Location.X,(Size.Height-label.Size.Height)/2); } } public override System.Drawing.Font Font { get { return base.Font; } set { base.Font=value; label.Font=value; } } public override String Text { get { return label.Text; } set { label.Text=value; label.Location=new System.Drawing.Point(this.Size.Width,label.Location.Y); } } public override System.Drawing.Color ForeColor { get { return base.ForeColor; } set { base.ForeColor=value; label.ForeColor=value; } } public override System.Drawing.Color BackColor { get { return base.BackColor; } set { base.BackColor=value; label.BackColor=value; } } public int Interval { get { return timer.Interval; } set { timer.Interval=value; } } #endregion private void timer_Tick(object sender, EventArgs e) { if((label.Location.X+label.Size.Width)>0) label.Location=new System.Drawing.Point(label.Location.X-1,label.Location.Y); else label.Location=new System.Drawing.Point(this.Size.Width,label.Location.Y); } }} .net 技术交流群 欢迎大家加入 群内有众多高手、爱好者 把label弄成透明的,然后移动位置就行了。 这样移动label闪动会很厉害,用double-buffer来手动画,大致思路参看http://blog.csdn.net/Knight94/archive/2006/08/18/1094078.aspx label没有卡拉OK的效果,挺难的?或者2个label来构成? 要实现这样的效果应该不难,但是要高效率可能就难了.呵呵.不过你可以到网上搜一下.如果对效率要求不高的话,可以用.net来做.但要记住:当前一些真正高效率的东西不是用.NET做出来的.一般用C++来做dll.用.net,DEPHI来做界面.因会用底层SDK的.千千静听那个歌词效果就是一个典型的例子. 我想到一个方法不是移动label了~而是更改label.text咯首先判断文字长度,然后一个一个切开,每次取1个往label里添-_-_~~~~~ 用time控件private void timer1_Tick(object sender, System.EventArgs e){str = str.Substring(1) + str.Substring(0,1);label1.Text = str;} 求JSON反序列化。 如何在windows ce监听反射的事件 c#线性表的语法,有点看不明,高手进来指法下! 如何用正则来匹配所有字符 百分求助,一个关于导出excel的问题 求高手帮帮忙!关于发送短信的问题,在线等啊,分全散了 问个图片的问题! 一个逻辑题目,用CSharp实现 WPF,请教XAML浏览器应用程序 我程序运行的时候,数据一会就连接不上拉,不知道为什么!急!! C#里面的WEB Table控件报错问题请教!急!在线等! 怎样实现象msn messenger弹出窗口的界面
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace Caster
{
/// <summary>
/// MyMoveChar 的摘要说明。
/// </summary>
public class MyMoveChar : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Timer timer;
private System.Windows.Forms.Label label;
private System.ComponentModel.IContainer components;
public MyMoveChar()
{
// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent();
timer.Tick+=new EventHandler(timer_Tick);
// TODO: 在 InitializeComponent 调用后添加任何初始化
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.label = new System.Windows.Forms.Label();
this.timer = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// label
//
this.label.AutoSize = true;
this.label.Location = new System.Drawing.Point(320, 0);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(0, 17);
this.label.TabIndex = 0;
//
// timer
//
this.timer.Enabled = true;
//
// MyMoveChar
//
this.Controls.Add(this.label);
this.Name = "MyMoveChar";
this.Size = new System.Drawing.Size(320, 32);
this.ResumeLayout(false);
}
#endregion
#region propertys
public new System.Drawing.Size Size
{
get
{
return base.Size;
}
set
{
base.Size=value;
label.Location= new System.Drawing.Point(label.Location.X,(Size.Height-label.Size.Height)/2);
}
}
public override System.Drawing.Font Font
{
get
{
return base.Font;
}
set
{
base.Font=value;
label.Font=value;
}
}
public override String Text
{
get
{
return label.Text;
}
set
{
label.Text=value;
label.Location=new System.Drawing.Point(this.Size.Width,label.Location.Y);
}
}
public override System.Drawing.Color ForeColor
{
get
{
return base.ForeColor;
}
set
{
base.ForeColor=value;
label.ForeColor=value;
}
}
public override System.Drawing.Color BackColor
{
get
{
return base.BackColor;
}
set
{
base.BackColor=value;
label.BackColor=value;
}
}
public int Interval
{
get
{
return timer.Interval;
}
set
{
timer.Interval=value;
}
}
#endregion
private void timer_Tick(object sender, EventArgs e)
{
if((label.Location.X+label.Size.Width)>0)
label.Location=new System.Drawing.Point(label.Location.X-1,label.Location.Y);
else
label.Location=new System.Drawing.Point(this.Size.Width,label.Location.Y);
}
}
}
http://blog.csdn.net/Knight94/archive/2006/08/18/1094078.aspx
或者2个label来构成?
private void timer1_Tick(object sender, System.EventArgs e)
{
str = str.Substring(1) + str.Substring(0,1);
label1.Text = str;}