J
Julian
Hi,
I am following up on an older thread about resizing a panel in a form
with the mouse.
http://groups.google.de/group/micro...ntrol+resizable&rnum=1&hl=de#bb247a9b14219d94
I tried this code to manipulate the right border of the panel but I
have a problem:
public class SizablePanel : Panel
{
private const int WM_NCHITTEST = 0x0084;
private const int HTRIGHT = 11;
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == WM_NCHITTEST)
{
Point pos = new Point((int)m.LParam);
pos = this.PointToClient(pos);
if (pos.X > this.Width - 5)
m.Result = new IntPtr(HTRIGHT);
}
}
}
I cannot make the panel narrower than about 120 pixel.
Does anyone have a solution to that?
Also I would like to drag the panel horizontally.
I am following up on an older thread about resizing a panel in a form
with the mouse.
http://groups.google.de/group/micro...ntrol+resizable&rnum=1&hl=de#bb247a9b14219d94
I tried this code to manipulate the right border of the panel but I
have a problem:
public class SizablePanel : Panel
{
private const int WM_NCHITTEST = 0x0084;
private const int HTRIGHT = 11;
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == WM_NCHITTEST)
{
Point pos = new Point((int)m.LParam);
pos = this.PointToClient(pos);
if (pos.X > this.Width - 5)
m.Result = new IntPtr(HTRIGHT);
}
}
}
I cannot make the panel narrower than about 120 pixel.
Does anyone have a solution to that?
Also I would like to drag the panel horizontally.