private void timer1_Tick(object sender, System.EventArgs e)
{
if(index >= count)
{
timer1.Enabled = false;
index = count = 0;
return;
}
index+=2;
richTextBox1.Select(index,0);
richTextBox1.ScrollToCaret();
} private void richTextBox1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
index = 0;
count = richTextBox1.Text.Length;
timer1.Enabled ^= true;
}
这是个richTextbox滚动的代码,不知道是不是符合你的要求!
下面这段是Label滚动的代码private void Form1_Load(object sender, System.EventArgs e)
{
this.timer1.Start(); }
private void timer1_Tick(object sender, System.EventArgs e)
{
this.timer1.Interval=1000;
if (this.label1.Location.Y<0)
{
this.label1.Location=new System.Drawing.Point(this.label1.Location.X,this.Height);
}
else
{
this.label1.Location=new System.Drawing.Point(this.label1.Location.X,this.label1.Location.Y-this.label1.Height-5);
} }
{
if(index >= count)
{
timer1.Enabled = false;
index = count = 0;
return;
}
index+=2;
richTextBox1.Select(index,0);
richTextBox1.ScrollToCaret();
} private void richTextBox1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
index = 0;
count = richTextBox1.Text.Length;
timer1.Enabled ^= true;
}
这是个richTextbox滚动的代码,不知道是不是符合你的要求!
下面这段是Label滚动的代码private void Form1_Load(object sender, System.EventArgs e)
{
this.timer1.Start(); }
private void timer1_Tick(object sender, System.EventArgs e)
{
this.timer1.Interval=1000;
if (this.label1.Location.Y<0)
{
this.label1.Location=new System.Drawing.Point(this.label1.Location.X,this.Height);
}
else
{
this.label1.Location=new System.Drawing.Point(this.label1.Location.X,this.label1.Location.Y-this.label1.Height-5);
} }
解决方案 »
- C# 实现远程关机功能
- 使用了microsoft agent的程序,在制作安装包的时候
- 系统限制连接数量
- 多线程操作界面的问题
- 我怎么能得到这个窗体?要求见内容,在线急等
- 请FCKeditor高手看过来?????
- 如何让一个窗口总是在桌面的最上层?
- c#中datagrid怎样使用checkbox
- 关于在Remoting中把服务器端的异常信息串行到客户端的问题(感兴趣的请进)
- object xmlObj = Server.CreateObject("microsoft.xmldom");如何从文件Load xml
- 如何在ORACLE中插入时间?
- 请问在winForm中除了用webclient()上传,还有其它方法吗?
dskfljslflksdf
slfldskfljskfjlsfjlksfjlsfjklsfjl
dsfsfsfsdfsdfsdfsffs
sdfsdfsdfsfsfsdfsfsfsfsdfsfgfdgsbdfgfg
dsfsf
或者用Align属性