The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I would like that my form inherit from Form (which has
this.ControlBox = false;
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
) would not allow moving.
I have try to override OnMove, but I do not achieve my aim, I guess it just do not call the associate delegate.
Any help is welcome,
thank you
ADAdministrator Syncfusion Team September 10, 2003 07:49 PM UTC
Hi Steve,
This is not exactly a solution, but you can try setting the FormBorderStyle to "None". This prevents the user from moving the form.
Regards,
Br.
>
> Hi,
>
> I would like that my form inherit from Form (which has
> this.ControlBox = false;
> this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
> ) would not allow moving.
> I have try to override OnMove, but I do not achieve my aim, I guess it just do not call the associate delegate.
>
> Any help is welcome,
>
> thank you
>
STSteveSeptember 11, 2003 10:16 AM UTC
I have found a better solution :
http://groups.google.de/groups?selm=u1eMJOibDHA.2632%40TK2MSFTNGP09.phx.gbl
in VB
and I implemented it like this in c#:
protected override void WndProc(ref Message m)
{
const int WM_NCLBUTTONDOWN = 161;
const int WM_SYSCOMMAND = 274;
const int HTCAPTION = 2;
const int SC_MOVE = 61456;
if((m.Msg == WM_SYSCOMMAND) && (m.WParam.ToInt32() == SC_MOVE))
{
return;
}
if((m.Msg == WM_NCLBUTTONDOWN) && (m.WParam.ToInt32() == HTCAPTION))
{
return;
}
base.WndProc (ref m);
}
> Hi Steve,
> This is not exactly a solution, but you can try setting the FormBorderStyle to "None". This prevents the user from moving the form.
>
> Regards,
>
> Br.
> >
> > Hi,
> >
> > I would like that my form inherit from Form (which has
> > this.ControlBox = false;
> > this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
> > ) would not allow moving.
> > I have try to override OnMove, but I do not achieve my aim, I guess it just do not call the associate delegate.
> >
> > Any help is welcome,
> >
> > thank you
> >
>