(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...

Any ideas?

VB Code:
  1. Dim pX As Single, pY As Single
  2.  
  3. Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  4.     pX = X
  5.     pY = Y
  6. End Sub
  7.  
  8. Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  9.     If Button = 1 Then
  10.         Move Left - (pX - X), Top - (pY - Y)
  11.     End If
  12. End Sub