Either learn Win32 (without any concern to .NET) and then learn how
System.Window.Forms.Form
works with Windows API. However, writing the code like this makes no sense at all. What to move a form? Use the instance properties of the class
System.Window.Forms.Form
:
Location
or
Left
and
Top
, that's all. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.aspx[
^].
You should understand that sending and handling so called Windows messages (especially between different processes) is old and specifically Windows mechanism. Microsoft people having hard time trying to get rid of it, and the biggest steps are creation of WPF, and, from the other hand, creation of novel OS like Singularity and working on new ones, like Midory (code name), Barrelfish, etc.
By using Windows messages directly in your application, you risk platform compatibility of your application. Did you know that, if you write a Form application accurately, despite the fact that
System.Window.Forms
is not a standard library, you still can run such application on many platforms (like different versions of Windows, Linux, Mac OS X and more, with different instruction-set architectures)
without recompilation? (You can do it through Mono,
http://en.wikipedia.org/wiki/Mono_%28software%29[
^],
http://www.mono-project.com/Main_Page[
^]). Why spoiling all that? Try to use pure .NET.
—SA