使用计时器移动文本 [英] move the text using timer

查看:126
本文介绍了使用计时器移动文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,

请告诉我如何使用计时器控件在Windows窗体中矩形移动文本.

Sir,

Please tell me how to move text rectangularly in a windows form using timer control.

推荐答案

将计时器间隔设置为50
然后设置一个整数int count = 0;
然后在timer_tick事件中..
做所需的工作..

set timer interval to 50
and then set an integer int count=0;
then in timer_tick event..
do the desired work..

if(count==1)
{
   txt_temp.Text="a";
   or,
   txt_temp.location=new point(x,y);
}
.
.
.
count++;


您好
创建表单标签并设置间隔计时器100并双击时间在时间​​函数中编写此代码
标签向右移动

Hi
create a label in form and set interval timer 100 and double click in time write this code in time function
label move to right

<pre>       private void timer1_Tick(object sender, EventArgs e)<br />
        {<br />
            label1.Left += 1;<br />
        }</pre>


^ ]可能会为您提供帮助.
This thread [^]might help you.


这篇关于使用计时器移动文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆