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
235.6k
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
)
0
Sam Hobbs
54
29.3k
2.1m
May 21 2011 3:02 AM
So you know about Spy++ and about messages and all that. You know that you can determine what you need to know using Spy++. So did you figure it out?
0
tri_inn
0
1.2k
235.6k
May 20 2011 8:37 AM
simply bogus idea........lol
0
Sam Hobbs
54
29.3k
2.1m
May 17 2011 8:08 PM
Use Spy++.
How to save treeview nodes in Database
A new expression requires () or [] after type