473,545 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

No WM_NCMOUSELEAVE messages under "Windows Classic Style"

Hi, hope I'm posting to the right forum.

I'm using C# under .NET 1.1, Windows XP SP2

I have a form and I've overridden WndProc to print to a text box whenever it
receives the WM_NCMOUSELEAVE message. Under "Windows XP Style", I get these
messages fine (when the mouse moves off the title bar or form borders).
Under "Windows Classic Style", I don't get the message at all!

Has anyone seen this?

Thanks!
Jen

Note: If you have an answer/solution, if you could also e-mail
lisseut_at_gmai l_dot_com that would be great! (I get so much spam in my
Hotmail account now...).

Sample source (I've tried some different things here):

private System.Windows. Forms.TextBox m_txtMessages;

protected override void WndProc(ref Message m)
{
const int WM_NCMOUSELEAVE = 0x02A2;
const int WM_MOUSELEAVE = 0x02A3;

switch (m.Msg)
{
case WM_MOUSELEAVE:
m_txtMessages.T ext = "WM_MOUSELEAVE\ n" + m_txtMessages.T ext;
break;
case WM_NCMOUSELEAVE :
m_txtMessages.T ext = "WM_NCMOUSELEAV E\n" + m_txtMessages.T ext;
break;
default:
break;
}
base.WndProc (ref m);
}

protected override void OnMouseEnter(Ev entArgs e)
{
base.OnMouseEnt er( e );
TRACKMOUSEEVENT tme = new TRACKMOUSEEVENT ();
tme.hwndTrack = this.Handle;
tme.cbSize = (uint)Marshal.S izeOf(tme);
tme.dwFlags = TME_NONCLIENT;
tme.dwHoverTime = 1000 * 3;
TrackMouseEvent (ref tme);
}

[DllImport("user 32.dll")]
static extern bool TrackMouseEvent (ref TRACKMOUSEEVENT lpEventTrack);

[StructLayout(La youtKind.Sequen tial)]
public struct TRACKMOUSEEVENT
{
public UInt32 cbSize;
public UInt32 dwFlags;
public IntPtr hwndTrack;
public UInt32 dwHoverTime;
};

const int TME_NONCLIENT = 0x00000010;
Jul 7 '06 #1
0 1968

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1566
by: Sara Khalatbari | last post by:
Hi! Suppose you're writing a module & writing the definition of each function in that module in " or """. for example: a) "This function does this & that" or: b) """This function does blah blah blah"""
8
5731
by: Hostile17 | last post by:
Consider the following HTML. ---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <title>Untitled</title>
4
4656
by: mike | last post by:
regards: <a href="JavaScript:loadwindow(106,90);" style="font-family:Verdana;">元智Intranet</a> In HTML spec,are "href" and "style" called "attribute"?....@@ Could someone good give me the hand? @@. thank you may god be with you
5
17672
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a fancy style, but the onclick fails to do anything no matter what permutation of parameters I try. <input type=button...
1
2916
by: Shock | last post by:
Hey guys, I'm trying to connect to an SQL Server Database using classic ado in VS.Net using the C# lang. I am using the Microsoft ActiveX Data Objects Library version 2.8. Here is the code I've written so far. public ADODB.Recordset getRecordSet(string strQuery) { ADODB.Connection adodbcon = new Connection(); int intOptions =...
10
3075
by: Parasyke | last post by:
I have a form that I choose from a list of database names and a list within a textbox comes up with the computer ID number and an associated (from a table) user name. Is there a way from looking at this code to tell the network ID name? I hope not to have to write the code with the "Dev Ashish" API code, which I'm sure is great but I can't...
1
13377
by: pcnerd | last post by:
I have VB.NET 2005 Express Edition. Is there a VB.NET equivalent to the "classic" VB's DoEvents? I searched the VB.NET Help & had no luck. In "classic" VB, DoEvents was used in code that might lock up the PC. Thank you. David
2
5145
by: SAL | last post by:
I have the following line of code in my Page_Load Event of my ASP.net page: txtExplanationofChange.Attributes.Add ("style","overflow :hidden"); which allows me to can turn off the Scrollbar of my multiline textbox. I am still fairly new to developing in ASP.net and C#, and I'm not sure if there is a better way to disable the scrollbar. The...
2
2042
by: Phaiz | last post by:
Not sure if you'd need an activex control but I'm looking for a script to change the folder view to "Classic View" within IE. I have an iframe that loads the users My Documents folder and would like it to display in 'Classic View' as opposed to the default 'Crap View' with the common tasks pane on the left-hand side. I'm very retarded with...
0
7487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7420
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7934
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7778
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3476
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1908
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.