字幕效果 [英] Marquee Effects
本文介绍了字幕效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hiiiiii全部..
谁能告诉我,如何在VB.NET中使用字幕效果.我的意思是说要像我们在HTML中做Marquee一样,如何在VB.NET中滑动文本.
我正在做我的项目工作,所以需要它.如果有人知道帮我.........
问候
Mithil
Hiiiiii all..
Would any one tell me, how to use Marquee effect in VB.NET. i mean to say how to slide a text in VB.NET as we do Marquee in HTML.
I am doing my project work, so its needed. If anyone knows help me out.........
Regard
Mithil
推荐答案
看看这篇文章:
易于使用Marquee Control for Windows Form且具有完全设计者支持的功能 [
Have a look at this article:
Easy to Use Marquee Control for Windows Form with Full Designer Support[^]
It''s a marquee control in Winforms as you want, it''s just that it''s in C#. But that shouldn''t be a an issue. Either you can use it directly or convert it into VB.NET. All you want is in it. :thumbsup:
我可以给您伪造...您可以将标签的长度增加1,而将标签的左侧减少1 ...使用计时器,您可以这样字幕的效果.
i can give you the pesudo... u can increase the length of a label by 1 while decrease its left by 1... using a timer this way u can make the effect of a marque.
我为u编写了代码
这是...标签的名称是lblmarquee,计时器的名称是计时器1 ...计时器设置为35 ...您可以将其更改为所需的速度
-------------------------------------------------- ----------------------
私有子Timer1_Tick(ByVal发送者作为System.Object,ByVal e作为System.EventArgs)处理Timer1.Tick
如果(lblmarquee.Left)+(lblmarquee.Width)< = 0则
lblmarquee.Left = Me.Width
如果结束
lblmarquee.Left =(lblmarquee.Left)-100
结束子
-------------------------------------------------- --------------------------
i made the code for u
here it is... the label''s name is lblmarquee and the timer''s name is timer 1... the timer is set at 35... u can change it for the desired speed
------------------------------------------------------------------------
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If (lblmarquee.Left) + (lblmarquee.Width) <= 0 Then
lblmarquee.Left = Me.Width
End If
lblmarquee.Left = (lblmarquee.Left) - 100
End Sub
----------------------------------------------------------------------------
这篇关于字幕效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文