|
-
Dec 17th, 2011, 05:36 PM
#32
Re: Move and Resize a Control or a Borderless Form - using window messages (smooth!)
It doesn't need a panel, you can just as well call my MoveForm code in the MouseClick of the Form itself. A Panel is just a neat example because that's a typical way to mimic a titlebar (you usually can't move a form from anywhere except the titlebar).
I also wasn't shooting down your code or anything, it's just as nice because it basically comes down to the same thing. It's just a little less flexible as minitech mentions (what if the user does want to use a panel or other control to move the form?) and I think it is less easy to understand. In your case, a method called "WndProc" (which is not very descriptive of what it does in this case, and I know you can't help that cause you override it) which checks a 'Result' to some arbitrary values. In my case, a MouseClick event that calls a MoveForm method. I think in most cases especially less experienced people will understand what my code does even if they don't understand how, which might not be true for your code immediately (though some comments can always fix that).
But thanks for the contribution, always appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|