Backup/Form3.vb
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
''' <summary>
''' 飘动的窗体
''' </summary>
Partial Public Class GoldForm
Inherits Form
Private currentX As Integer
'图片的当前横坐标
Private currentY As Integer
'图片的当前纵坐标
Private screenHeight As Integer
'屏幕高度
Private screenWidth As Integer
'屏幕宽度
Private counter As Integer
'图片数量
Private increment As Integer
'移动增量
Private interval As Integer
'移动时间间隔
Private bmpFlake As Bitmap = My.Resources.snow
''' <summary>
''' 构造函数
''' </summary>
''' <param name="interval">移动间隔</param>
''' <param name="currentX">飘动窗体的横坐标</param>
Public Sub New(ByVal interval As Integer, ByVal currentX As Integer)
Me.interval = interval + 10
Me.currentX = currentX
InitializeComponent()
BitmapRegion.CreateControlRegion(Me, bmpFlake)
End Sub
Private Sub GoldForm_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
'获取屏幕的工作区域,不包括状态栏
Dim rectangleWorkArea As Rectangle = Screen.PrimaryScreen.WorkingArea
screenHeight = rectangleWorkArea.Height
screenWidth = rectangleWorkArea.Width
timerMove.Interval = interval
'设置timer的间隔
Me.Left = currentX
'设置窗体的起始横坐标
timerMove.Start()
'运行timer
End Sub
'timer的事件
Private Sub timerMove_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerMove.Tick
timerMove.[Stop]()
currentY += 5
counter += 1
Dim random As New Random()
If counter = 15 Then
If (random.[Next](10) - 5) > 0 Then
increment = 1
Else
increment = -1
End If
counter = 0
后面还有 16 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
