Put a Timer on a Form and try this:
Code:Private Sub Form_Load() Timer1.Interval = 100 End Sub Private Sub Timer1_Timer() With Screen If Left < 0 Then Left = 0 ElseIf (Left + Width) > .Width Then Left = .Width - Width End If If Top < 0 Then Top = 0 ElseIf (Top + Height) > .Height Then Top = .Height - Height End If End With End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]




Reply With Quote