by Vipul Parmar (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 18th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Moves the form around on the screen from corner to corner.
API Declarations
''Draw One command-button on Form.
If frm.WindowState <> 0 Then Exit Sub
Dim X As Integer
Dim Y As Integer
Dim a As Integer
Dim b As Integer
Dim C As Integer
Dim d As Integer
Dim g As Integer
Dim current As Double
g = frm.Left
b = frm.Top
X = frm.Width
Y = frm.Height
C = g
d = b
current = Timer
Do While Timer - current < 0.1
DoEvents
Loop
For a = 0 To 10
Call frm.Move(0, 0, X, Y)
current = Timer
Do While Timer - current < 0.1
DoEvents
Loop
Call frm.Move(Screen.Width - frm.Width, 0, X, Y)
current = Timer
Do While Timer - current < 0.1
DoEvents
Loop
Call frm.Move(Screen.Width - frm.Width, Screen.Height - frm.Height, X, Y)
current = Timer
Do While Timer - current < 0.1
DoEvents
Loop
Call frm.Move(0, Screen.Height - frm.Height, X, Y)
current = Timer
Do While Timer - current < 0.1
DoEvents
Loop
Next a
Call frm.Move(g, b, X, Y)
End Sub
private sub command1_click()
call fourcourners
end sub