PDA

Click to See Complete Forum and Search --> : Have form Grab edge of screen


rockies1
Nov 15th, 1999, 10:51 PM
How do I get a form to grab the edge of the screen similar to WinAmp?

------------------
Morgan
rockies1@gvi.net
My Web Page (http://members.xoom.com/Rockies1)

rockies1
Nov 16th, 1999, 12:12 AM
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
rockies1@gvi.net
My Web Page (http://members.xoom.com/Rockies1)

Aaron Young
Nov 16th, 1999, 11:18 AM
Put a Timer on a Form and try this:

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
aarony@redwingsoftware.com
adyoung@win.bright.net