private void Horizontal_MouseMove(object sender, MouseEventArgs e)
{
if (Action == SizeAction.SizeH && e.Button == MouseButtons.Left)
{
Point start;
int x = e.X;
int y = e.Y;
if (y + Horizontal.Top > Height - 4)
y = Height - 4 - Horizontal.Top;
if (y + Horizontal.Top < 0)
y = 0 - Horizontal.Top;
if (!FirstTime)
{
start = PointToScreen(Location);
start.Y += PrevPos.Y + Horizontal.Location.Y;
ControlPaint.FillReversibleRectangle(new Rectangle(start.X, start.Y, Width, 3), Color.Black);
}
else
FirstTime = false;
start = PointToScreen(Location);
start.Y += y + Horizontal.Location.Y;
ControlPaint.FillReversibleRectangle(new Rectangle(start.X, start.Y, Width, 3), Color.Black);
PrevPos = new Point(x, y);
}
}