'找到一段代码
'添加一个Timer,三个Option放在一个Frame里
Private Sub Timer1_Timer()
If Form1.WindowState = 0 Then
'^The form can't be moved in Max. or Min. mode^
If Option1.Value = True Then
'^If the horizontal bouncing is enabled then...^
Form1.Left = (Screen.Height - Form1.Left) / 2
'^try to visualize this because it can't be explained...
'you can also draw it on a paper to help you
'understand what it actually is. +_+
ElseIf Option2.Value = True Then
'^if the vertical bouncing is enabled then...^
Form1.Top = (Screen.Width - Form1.Top) / 2
'^try to visualize om your own.^
ElseIf Option3.Value = True Then
'^if the horizontal and vertical bouncing are enabled then...^
Form1.Left = (Screen.Height - Form1.Left) / 2
Form1.Top = (Screen.Width - Form1.Top) / 2
'^same as above. Try to visualize.^
End If
End If
'------------------------------------------------------------------
'------------------------------------------------------------------
'------------------------------------------------------------------
End Sub