hberenguel
Mon Jan 24 17:11:04 CST 2005
Hi there... the code you told me seems to be a C++ one? And my trouble is
about how to build a clone of Microsoft Money screen... not only how to move
it...
Thanks a lot for your helping
const int WM_NCLBUTTONDOWN =0xA1;
const int WM_NCHITTEST = 0x84;
const int HT_CAPTION = 0x2;
//Move the form with a control.
//With this Method you lose the MouseUp, Click and DoubleClick events of the
control.
private void userControl1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
userControl1.Capture = false;
Message msg=Message.Create(Handle, WM_NCLBUTTONDOWN, (IntPtr)HT_CAPTION,
IntPtr.Zero);
WndProc(ref msg);
}
//Move the form with the form.
//With this Method you lose the MouseUp, Click and DoubleClick events
//aswell as the ContextMenu of the form.
protected override void WndProc(ref Message m)
{
base.WndProc (ref m);
if (m.Msg == WM_NCHITTEST)
m.Result = (IntPtr)HT_CAPTION;
}
"Herfried K. Wagner [MVP]" wrote:
> "hberenguel" <hberenguel@discussions.microsoft.com> schrieb:
> > I´d like to build a application with the same look and feel of the
> > Microsoft
> > Money 2005. As you can see, the first screen is maximized with the control
> > buttons (minimize, maximize, close window) but the title bar, of the
> > window,
> > is not showing blue, as Windows standard, it´s showing a part of a
> > background
> > image, giving to the user the sensation that it has no form title.
>
> Move a borderless form.
> <URL:
http://www.dotnetrix.co.uk/misc.html>
>
> --
> M S Herfried K. Wagner
> M V P <URL:
http://dotnet.mvps.org/>
> V B <URL:
http://dotnet.mvps.org/dotnet/faqs/>
>
>