Results 1 to 3 of 3

Thread: Have form Grab edge of screen

  1. #1

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375

    Post

    How do I get a form to grab the edge of the screen similar to WinAmp?

    ------------------
    Morgan
    [email protected]
    My Web Page

  2. #2

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375

    Post

    That works great! Thanks.

    Now, is it possible to make to jump while it's being moved?

    I adjusted it so that if the form is dropped within 500 of the edge, it jumps to the edge, but would like it to jumps as it's moving...

    Is that possible?

    ------------------
    Morgan
    [email protected]
    My Web Page

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width