回复 24F 天蝎の绝缘体 的帖子
顺便送你一段最最简单的给你玩一下,哈哈
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub Form_Load()
SetWindowPos Me.hWnd, -1, 500, 150, Me.Width, Me.Height, 1
Randomize Timer
Me.Width = Int(Screen.Width / 2 * Rnd)
Me.Height = Int(Screen.Height / 2 * Rnd)
Me.Left = Int((Screen.Width - Me.Width) * Rnd)
Me.Top = Int((Screen.Height - Me.Height) * Rnd)
Timer1.Interval = Int(Rnd * 5000) + 5000
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim a As New Form1
a.Show
Cancel = 1
Me.FontSize = 14
Print "?????" & vbCrLf & "????……"
End Sub
Private Sub Timer1_Timer()
Me.Left = Rnd * 10000
Me.Top = Rnd * 8000
End Sub