滚动字幕代码 滚动字幕的制作
怎么用dreamweer制作滚动字幕
public class MyMoveChar : System.Windows.Forms.UserControl1.建立个滚动字幕。代码:
滚动字幕代码 滚动字幕的制作
滚动字幕代码 滚动字幕的制作
2.各参数详解:
a)scrollAmount。它表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好。
b)width和height,表示滚动区域的大小,width是宽度,height是高度。特别是在做Sub垂直滚动的时候,一定要设height的值。
c)direction。表示滚动的方向,默认为从右向左:←←←。可选的值有rightthis.label.Size = new System.Drawing.Size(0, 17);、down、up。滚动方向分别为:right表示→→→,up表示↑,down表示↓。
d)scrollDelay,这也是用来控制速度的,默认为90,值越大,速度越慢。通常scrollDelay是不需要设置的。
e)behior。用它来控制属性,默认为循环滚动,可选的值有alternate(交替滚动)、slide(幻灯片效果,指的是滚动一次,然后停止滚动)
怎么用一个html页面实现背景音乐和滚动字幕?
if thisform.label1.left <-thisform.label1.width需要准备的材料分别有:电脑、浏览器、html编辑器。
="请"1、首先,打开html编辑器,新建html文件,例如:index.html。
技术含量不高,供参考!2、将index.html中的
标签的代码替换为:3、浏览器运行index.html页面,此时发现页面多了背景和背景音乐。
ass滚动字幕代码 卡到一半 求解
/// >你是外挂字幕来看 还是压制好来看 如果是外挂的话 压制一下就好了 还有 好像不能造成移动效果吧 移动的应该是 move吧。。
{get我的想法是,换个播放器试试
C# 滚动字幕如何实现?
3,需要用到time控件来计时1.实例讲述了C#滚动字幕的实现方法,具体方法如下:
//鼠标离开,开始滚动在c#中其实滚动屏幕的实现其实很简单,只需要用到Graphics.DrawString方法. Graphics.DrawString (String s, Font font, Brush brush, PointF point) 在指定位置并且用指定的 Brush 和 Font 对象绘制指定的文本字符串。
//s 要绘制的字符串。
font 它定义字符串的文本格式。
brush 它确定所绘制文本的颜色和纹理。
point 结构,它指定所绘制文本的左上角。
其中,要用到的就是point函数,通过控制它的X或Y参数来控制文字的偏移量.下面以水平滚动字幕为例.
2.private Label label = new Label();
public string text="csdn baihe_5";
private void FrmShow_Load(object sender, EventArgs e)
{this.label.Location = new Point(149, 13);
this.label.Size = new Size(134, 16);
this.Controls.Add (label);
this.label.Text = "";
this.timer1.Enabled = true;
}PointF p;
Font f = new Font("宋体", 10);
Color c = Color.White;
string temp;
private void timer1_Tick(object sender, EventArgs e)
{Graphics g = this.label.CreateGraphics();
SizeF s = new SizeF();
s = g.MeasureString(text, f);//测量文字长度
Brush brush = Brushes.Black;
g.Clear(c);//清除背景
if (temp != text)//文字改变时,重新显示
{p = new PointF(this.label.Size.Width, 0);
temp = text;
}else
p = new PointF(p.X - 10, 0);//每次偏移10
if (p.X <= -s.Width)
g.DrawString(text, f, brush, p);
}
思想如下:
1,在程序的界面添加一个控件 用于现在滚动文本
2,在主方法中写一个方法来控制文本的滚动
using System.Collections;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace Caster
{///
/// MyMoveChar 的摘要说明。
{private System.Windows.Forms.Timer timer;
private System.Windows.Forms.Label label;
private System.ComponentModel.IContainer components;
public MyMoveChar()
{// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent();
// TODO: 在 InitializeComponent 调用后添加任何初始化
}///
/// 清理所有正在使用的资源。
protected override void Dise( bool dising )
{if( dising )
{if(components != null)
{components.Dise();
base.Dise( dising );
}#region 组件设计器生成的代码
///
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
private void InitializeComponent()
{thisponents = new System.ComponentModel.Container();
this.label = new System.Windows.Forms.Label();
this.timer = new System.Windows.Forms.Timer(thisponents);
// label
this.label.AutoSize = true;
this.label.Location = new System.Drawing.Point(320, 0);
this.label.Name = "label";
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
{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
{return base.Font;
}set
label.Font=value;
public override String Text
{return label.Text;
}set
{label.Text=value;
public override System.Drawing.Color ForeColor
{return base.ForeColor;
}set
{base.ForeColor=value;
public override System.Drawing.Color BackColor
{return base.BackColor;
}set
{base.BackColor=value;
public int Interval
{return timer.Interval;
}set
{timer.Interval=value;
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);
}
c语言滚动字幕代码
祝您开心愉快!您的满意就是对我的支持和鼓励!头文件:#include
函数:Sleep(time) //注意S要大写
#include
#include
int main()
{int i;
for(i=0;i<=5;i++)
{Sleep(1000); //单位为毫秒
printf以上是由QQ空间答疑团为您解答!(" ");
输出前调用sleep(1000);
asp 字幕连续滚动代码
laelsebel.BackColor=value;无缝滚动是使用JS实现的,其原理很简单将要滚动的Div平铺在父Div中,使用JS控制父DIv的滚动 Object.scrollLeft(向左) = Object.scrollLeft+滚动距离一定的时间间隔滚动一次当滚动距离 = 要滚动DIv的大小的时间,让父Div的 Object.scrollLeft回复到0,开始新一轮的滚动,这样就实现的无缝滚动,依上原理写出实例:
&vbCrLf
&"纳"
&vbCrLf
&"我"
&vbCrLf
&"的"
&vbCrLf
&"答
"&
&"案"
&vbCrLf
&"已"
&vbCrLf
&"通"
&vbCrLf
&"过"
&vbCrLf
&"测"
&vbCrLf
&"试"
End
Private
Timer1_Timer()
Label1.Top
=Label1.Top
-200'没执行一次使label1的top减少200缇,200可以修改为任意你要的值
If
Label1.Top
+Label1.Height
Label1.Top =ChuShiWeiZhi End If End 通过测试,请采纳,我是vb编程团队成员,很高兴为您服务! 加入一个命今按钮:command1. 加入一个文本框:text1. 加入一个时间控件:timer1. 加入一个横向的滚动条:hscroll1.把:min属性设为2,max属性设为100,allchange设为1。 下面代码: private sub command1_click() timer1.enabled timer1.interval =10 end sub private sub form_load() command1.caption ="开始" text1.backcolor =&h8000000f text1.borderstyle =text1.text ="测试区域" timer1.enabled =false#endregion end sub private sub hscroll1_change() timer1.interval =10 /10 end sub private sub hscroll1_scroll() timer1.interval =10 /10 end sub private sub timer1_timer() tprintf("保龄球赛开始,请做好扔球准备:n");ext1.left =text1.left -50 if text1.left text1.left =form1.width end if end sub 用move代码,不放在那个框里,直接输在你那行字幕的前面 {move(x1,y1,x2,y2 ,[t1,t2])} t1,t2---开始和结束时间,毫秒为单位,不写时间也可以的,就是你整个区间的时间内都在动 例如:{move(1200,970,400,970)},具体看你那行字多长来设xy 楼主您好:代码}}为: [marquee]文字[/marquee]----------------------------------------------------------------- ----------------------------------------------------------------- -------------------------------------------------------------------网页中谁知道 实现字幕滚动一栏停一下,间隔几秒继续滚动的代码?
字幕的代码有那些?
label.ForeColor=value;qq空间滚动字幕代码是什么?
///
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系 836084111@qq.com 删除。