- 51Aspx源码必读.txt[1KB]
- from.jpg[11KB]
- NewsTicker.sln[2KB]
- 最新Asp.Net源码下载.url[123B]
源码介绍
源码参数
一、更新记录
1、更新日期:2023-05-30 00:00:00
2、更新内容:
VB自制新闻播报控件源码
源码描述:
VB自制的一款新闻播报控件,可以滚动显示头条信息
用到了Graphics.Drawstring
关键代码展示:
Private Sub SetupWindow()
Me.SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
Gr = Me.CreateGraphics()
X = Me.Width
Me.BorderStyle = Windows.Forms.BorderStyle.Fixed3D
Me.Dock = DockStyle.Bottom
_strSize = Gr.MeasureString(_news, Me.Font)
If (Me.Height < _strSize.Height + 4) Then Me.Height = CInt(_strSize.Height) + 4
Timer.Interval = 25
Timer.Start()
End Sub
Private Sub UpdateDisplay()
Dim tHeight As Double = _strSize.Height
Select Case Me.TextPosition
Case TextPlacement.Top : Y = 0
Case TextPlacement.Middle : Y = CSng((Me.Height / 2) - (tHeight / 2))
Case TextPlacement.Bottom : Y = CSng(Me.Height - tHeight)
End Select
Gr.Clear(Me.BackColor)
TextRenderer.DrawText(Gr, _news, Me.Font, New Point(CInt(X), CInt(Y)), Me.ForeColor)
If X <= (0 - _strSize.Width) Then
X = Me.Width
Else
X = CSng(X - _speed)
End If
End Sub
下载记录(Only Recent 100)
用户名 | 推荐指数 | 下载时间 |
---|