
- UID
- 100684
- 帖子
- 90
- 主題
- 13
- 精華
- 0
- 積分
- 19
- 楓幣
- 132
- 威望
- 17
- 存款
- 0
- 贊助金額
- 0
- 推廣
- 1
- GP
- 42
- 閱讀權限
- 10
- 性別
- 保密
- 在線時間
- 35 小時
- 註冊時間
- 2015-4-26
- 最後登入
- 2023-6-13
|
範例圖:
程式碼:- Public Class Form1
- Dim MoveInt As Int64
- Dim Move2 As Int64
- Dim Move3 As Int64
- Dim Down As Int64 = My.Computer.Screen.WorkingArea.Height + Me.Size.Height
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Me.Location = New Point(My.Computer.Screen.Bounds.Width - Me.Size.Width, My.Computer.Screen.Bounds.Height + Me.Size.Height)
- MoveInt = My.Computer.Screen.Bounds.Height - My.Computer.Screen.WorkingArea.Height
- Move2 = MoveInt + Me.Size.Height
- Move3 = My.Computer.Screen.Bounds.Height - Move2
- MOve.Start()
- End Sub
- Private Sub MOve_Tick(sender As Object, e As EventArgs) Handles MOve.Tick
- If Move3 < Me.Location.Y Then
- Me.Location = New Point(Me.Location.X, Me.Location.Y - 5)
- Else
- Me.TopMost = True
- MOve.Stop()
- End If
- End Sub
- Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
- Me.TopMost = False
- MOVEDOWN.Start()
- End Sub
- Private Sub MOVEDOWN_Tick(sender As Object, e As EventArgs) Handles MOVEDOWN.Tick
- If Down > Me.Location.Y Then
- Me.Location = New Point(Me.Location.X, Me.Location.Y + 5)
- Else
- End
- MOVEDOWN.Stop()
- End If
- End Sub
- Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
- End Sub
- End Class
複製代碼 MOve跟MOVEDOWN 是Timer
Interval 都是1
|
|