how to make a windows (Form) movable. C# Forms ( drag custom borderless windows )

preview_player
Показать описание
in C# Form

create:

public Point mouseLocation;
on event mouse_down
mouseLocation = new Point( -e.X, -e.Y);

then on event mouse_move:

if(e.Button == MouseButtons.Left)
{
Point mousePose = Control.MousePosition;
mousePose.Offset(mouseLocation.X, mouseLocation.Y);
Location = mousePose;
}

Thank you for watching.
#Monarc.
Рекомендации по теме
Комментарии
Автор

Perfect what i want its thanks a lot man

knightsvip
Автор

try to make shorter videos next time ! it brings more views and more likes and more subscribers, have nice day, not bad content

MDTVclips
Автор

So I did it and now its saying it cant debug please help?

nauseous_s