Sibby
Feb 15th, 2002, 12:27 PM
(let's try the API guru forum)
I want to enulate the same thing you see when moving a form with the "Show window content while dragging" option turned on....but instead through code. Right now I'm using code based on an image with a MASK color for custom forms. So in that I'm using the RELEASECAPTURE & SENDMESSAGE API in the pictures MouseDown event to move the form. However, when I do that I get the window outline when moving. (looks bad).
So I tried the simple approach (see code below) and that yeilded a NASTY "trailing" effect on my image. (It's fun to mess the hell out of your screen :), but that's not really what the app is for)However when I go back to the original approach and turn on "Show window content while dragging" it looks spectacular! I just don't want the user to have to turn this on in order to get a good looking app. Windows can do it, I want to too... :rolleyes:
Any ideas?
Dim pX As Single, pY As Single
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
pX = X
pY = Y
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Move Left - (pX - X), Top - (pY - Y)
End If
End Sub
I want to enulate the same thing you see when moving a form with the "Show window content while dragging" option turned on....but instead through code. Right now I'm using code based on an image with a MASK color for custom forms. So in that I'm using the RELEASECAPTURE & SENDMESSAGE API in the pictures MouseDown event to move the form. However, when I do that I get the window outline when moving. (looks bad).
So I tried the simple approach (see code below) and that yeilded a NASTY "trailing" effect on my image. (It's fun to mess the hell out of your screen :), but that's not really what the app is for)However when I go back to the original approach and turn on "Show window content while dragging" it looks spectacular! I just don't want the user to have to turn this on in order to get a good looking app. Windows can do it, I want to too... :rolleyes:
Any ideas?
Dim pX As Single, pY As Single
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
pX = X
pY = Y
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Move Left - (pX - X), Top - (pY - Y)
End If
End Sub