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
tri_inn
NA
1.2k
232.9k
Detect mouse over & out on minimize SDI window form apps c#
May 17 2011 3:25 AM
suppose i have mdi and few sdi form. when sdi form is minimize in mdi window and if i place my mouse on minimize sdi window then how could i detect that mouse is placed on minimize sdi windows or mouse out with c#. please guide me that how could i detect mouse over & out on minimize SDI window in MDI application with c#.
i tried the below code to detect mouse over on minimize window.it is working when i put my mouse on minimize windows title bar. here is my code.
private static int WM_NCMOUSEMOVE = 0x00A0;
private static int WM_COMMAND = 0x0112;
private static int SC_MINIMIZE = 0xf020;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_COMMAND && m.WParam.ToInt32() == SC_MINIMIZE)
{
OnMinimize(EventArgs.Empty);
}
else if (m.Msg == WM_NCMOUSEMOVE)
{
int x = m.LParam.ToInt32() & 0x0000ffff;
int y = m.LParam.ToInt32() >> 16;
OnNcMouseMove(new MouseEventArgs(MouseButtons.None, 0, x, y, 0));
}
base.WndProc(ref m);
}
but the i want to know how could i detect when mouse is out from the minimize window. please guide me with sample code.
Reply
Answers (
3
)
How to save treeview nodes in Database
A new expression requires () or [] after type