VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Moves the form around on the screen from corner to corner.

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.

Rate Moves the form around on the screen from corner to corner.



   
   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

Download this snippet    Add to My Saved Code

Moves the form around on the screen from corner to corner. Comments

No comments have been posted about Moves the form around on the screen from corner to corner.. Why not be the first to post a comment about Moves the form around on the screen from corner to corner..

Post your comment

Subject:
Message:
0/1000 characters