I've been working on this program for quite a while, and I'm pleased with how it's turned out. I've released several versions, improving on the base concept every time, but I think things are starting to get a little too heavy and odd things are happening.
Basically, I've got a main form with a child form. The child form is nothing more than a single-pixel border with a handle in each corner, at each edge (centered to that edge) and in the center of the form. The handles are simple panels. When I hold the mouse on one of them and drag, it resizes the form from that handle. I did it this way because I wanted to see if I could, and I could. The thing that's bother me, however, is that when I move the top-left, top, top-right, left, and bottom-left handles, the form flickers...badly, especially toward the right and bottom edges.
I'm sure I know why this is. When moving any of those 5 handles, it causes the form to resize, and move (since sizing is done from the top-left, and moving any of those handles moves the top-left). I use a single method to reposition the handles when I resize the form (because I want the handles to stay in the corners/edges/center). I thought perhaps running the positioning method in a thread would solve the problem, but it didn't. I tried SuspendLayout()/ResumeLayout(), to no avail.
I don't remember this happening before, at least not this badly. I re-downloaded a previous build and it definitely didn't do it this badly. I'd really like to figure out how get this to stop. It's not app-breaking or anything, in the end the form does resize to the proper location/size, but it's just annoying to see the flicker while resizing.
Also, for the record, I tried turning on double buffering for my form, didn't help.
Is there any way I could turn these fake handles into actual resizing handles, like, enable hit-testing on them and catch the messages with WndProc?
Here's a source of the app in it's current state, there's a build in the bin/Release folder. It's messy since I'm in the process of doing some updates, so forgive me for that:
http://infectionist.com/extras/cshar..._1.5.1_src.zip