TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
greg dorian
NA
116
0
Moving a panel in runtime code with error
Apr 25 2013 5:14 PM
I´m using this code for move my panel in a windowform;
// variables used
private bool btnDown;
private int offsetX;
private int offsetY;
private void pnlOrder_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
btnDown = true;
offsetX = e.X;
offsetY = e.Y;
}
}
private void pnlOrder_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
btnDown = false;
}
}
private void pnlOrder_Move(object sender, EventArgs e)
{
if (btnDown)
{
pnlOrder.Left += e.X - offsetX;// here in e.X
are you missing a
using
directive or an assembly
reference
? error
pnlOrder.Top += e.Y - offsetY;// and here e.Y
are you missing a
using
directive or an assembly
reference
?
}
}
what is wrong with e.X and e.Y????
Reply
Answers (
2
)
background image
filter datagridview