小妹请教在WinFrom程序里如何用控件做成公告栏上下翻动的效果啊! 在WinFrom程序里如何用控件做成公告栏上下翻动的效果啊!例如像http://blog.5d.cn/user5/yuheduo/200605/259631.html 这个页面的上下翻动的效果!就一行一行的翻就行!不用WebBrowser控件!求思路!求代码! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://blog.csdn.net/mcs3659282/article/details/4228926 我放了两个Label,这样实现很难看!private void timer1_Tick(object sender, EventArgs e) { timer1.Interval = 5000; if (label1.Visible) { label2.Visible = true; label1.Visible = false; } else { label2.Visible = false; label1.Visible = true; } } 如果可以用WPF,可以直接定义动画。要不就Timer移动控件 建议用 WebBrowser 调用网页的效果 不能用动画!!!我又改了一下,放了一个Panel,Panel放了两个Label,两个Label的Dock都是Fill,这样Label好像翻动了,但是Label2怎么处理那!还有label1.Location.X,Y永远都是0.怎么处理一下。private void timer1_Tick(object sender, EventArgs e) { int FWidth = this.panel1.Width; int FHeight = this.panel1.Height; Point LPos = new Point(this.label1.Location.X, this.label1.Location.Y); if (LPos.Y < FHeight) { this.label1.Location = new Point(LPos.X, LPos.Y + 2); return; } else { this.label1.Location = new Point(0, 0); } } winform要是做出流畅的那种有点费劲把 我已经知道用定时器了!现在窗体里有一个定时器、一个Panel、两个Label!两个Label放在Panel里。怎让这两个Label上下翻动那! 记录它们的坐标 让这两个label交换位置就行了 我现在这么改的!怎么能加上Label2的内容那! private void timer1_Tick(object sender, EventArgs e) { int label1top = this.label1.Top; int label1bt = this.panel1.Bottom; label1top = label1top - 2; if (label1bt <= this.Top) { label1top = 450; } label1.Top = label1top;} 现在能两个一起滚动,我怎么做让它们循环滚动那! int label1top = this.label1.Top; int label1bt = this.panel1.Bottom; label1top = label1top - 2; if (label1bt <= this.Top) { label1top = 450; } label1.Top = label1top; int label2top = this.label1.Bottom; int label2bt = this.panel1.Bottom; label2top = label2top - 2; if (label2bt <= this.Top) { label2top = 450; } label2.Top = label2top; IWebBrowser2 求大神 wpf 用键盘上下左右控制焦点 服务器端调用客户端JS方法 请问VS2005中如何使用框架 vb 语句 如何变c #? 帮忙看看,GirdView的奇怪问题 vs2008打包.net3.5 天才们,怎么样才能改变listView,textBox等控件的滚动条风格呢? 关于C# 刻录程序的问题。 Burning and Erasing CD/DVD/Blu-ray Media with C# and IMAPI2 请教:下面这个程序错在哪? GOOGLE MAP嵌入WINDOWS窗体? 用string表示的对象怎么转换得到真正的对象?
{
timer1.Interval = 5000;
if (label1.Visible)
{
label2.Visible = true;
label1.Visible = false;
}
else
{
label2.Visible = false;
label1.Visible = true;
} }
怎么处理一下。private void timer1_Tick(object sender, EventArgs e)
{
int FWidth = this.panel1.Width;
int FHeight = this.panel1.Height; Point LPos = new Point(this.label1.Location.X, this.label1.Location.Y);
if (LPos.Y < FHeight)
{
this.label1.Location = new Point(LPos.X, LPos.Y + 2);
return;
}
else
{
this.label1.Location = new Point(0, 0);
} }
{
int label1top = this.label1.Top;
int label1bt = this.panel1.Bottom;
label1top = label1top - 2; if (label1bt <= this.Top)
{
label1top = 450;
}
label1.Top = label1top;
}
int label1bt = this.panel1.Bottom;
label1top = label1top - 2; if (label1bt <= this.Top)
{
label1top = 450;
}
label1.Top = label1top; int label2top = this.label1.Bottom;
int label2bt = this.panel1.Bottom;
label2top = label2top - 2; if (label2bt <= this.Top)
{
label2top = 450;
}
label2.Top = label2top;