your best bet for drag and drop is lockwindowupdate win api ex: lock-->LockWindowUpdate(yourform.Handle) / unlock LockWindowUpdate(0);
you can also try
-- begin/end update
-- sendmessage with WM_SetRedraw
ex :lock --> SendMessage(yourform.Handle, WM_SETREDRAW, 0, 0); / unlock SendMessage(yourform.Handle, WM_SETREDRAW, 1, 0)
with send message you have to redraw the window after unlock
@Never: In your post, it looks like you're mentioning drag and drop to me. As I said, I appreciate the fact that you tried to help.
@lagprogramming:
I'm not sure I understand the situation from your previous posts.
As I said, I have a form set up to allow me to drag it around the screen. When I drag it across a black background, white ghosting appears around the form when it is moved. The faster the form is moved, the more pronounced the effect.
If you don't run the binary build file(F9), instead you just move the form in designing state, the comparison is done exclusively between IDEs and not between built applications.
This is -NOT- an IDE problem; I am not saying that. This problem occurs when the executable is running. removing debug info does help a little bit. If you run the exe from the IDE with debug information installed, it slows down even more. But, as I said, that's to be expected as debugging requires monitoring of the application.
If you run the binary application from the IDEs(F9) and you let them in the background, again you're influenced by the IDEs. Why, because Lazarus has different code that has to be run in order to repaint it's windows, compared to Delphi.
I understand this. I have looked at Forms.pas of both Delphi and FPC. I also understand that Lazarus / FPC is cross-platform, so the difference is understandable.
This means that if you move around the form of the same binary application over Lazarus and over Delphi, different repainting intervals(might lead to flicker) are expected to appear. Can you try comparing the binary files built by you over a neutral background(like an empty desktop for example)?
The form flickers wherever it's dragged. It's easier to see when the background is dark or black, but it's visible anywhere on the screen.
If indeed, the flicker comes from the binary file you may send me a PM.
I will try to create a simple example, demonstrating the effect I am seeing, and I will post it here. Hopefully, this will make it easier for you (and anyone else) to try and diagnose the problem.
Why don't you use Lazarus 1.4.0!?
This is what I downloaded from the Lazarus 1.4 announcement post. Or, what I -thought- I downloaded.
:MJ