473,396 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Control Event Monitoring

I am in the process of creating a C# automation application that will
work off of notifications in other applications. I want to be able to
monitor the WM_NOTIFY event for various controls and then take the
corresponding actions (simple automation stuff).

I started out working on this by attempting to hook the parent of the
control that I am interested in. I created an unmanaged C DLL for
setting/clearing the hook, and for passing the messages to my managed
application via the PostMessage method. I am hooking with the
WH_CALLWNDPROC hook type and I just don't ever see the WM_NOTIFY
message. I was hoping that someone would be able to point me in the
right direction here. Anything from examples to tutorials would help.

Feb 15 '07 #1
2 2002
I am hooking with the
WH_CALLWNDPROC hook type and I just don't ever see the WM_NOTIFY
message. I was hoping that someone would be able to point me in the
right direction here. Anything from examples to tutorials would help.
I think that by default Forms in .NET ignore notify messages. Look up
the SetStyle function to see how to change that. (One of the enums for
that enables it, I believe.)

BTW, if the program you're monitoring is one that you have the source
code for, I'd strongly recommend sockets instead of Windows messages.
They're just much more portable.

Feb 15 '07 #2
<jo**********@sbcglobal.netwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
>I am in the process of creating a C# automation application that will
work off of notifications in other applications. I want to be able to
monitor the WM_NOTIFY event for various controls and then take the
corresponding actions (simple automation stuff).

I started out working on this by attempting to hook the parent of the
control that I am interested in. I created an unmanaged C DLL for
setting/clearing the hook, and for passing the messages to my managed
application via the PostMessage method. I am hooking with the
WH_CALLWNDPROC hook type and I just don't ever see the WM_NOTIFY
message. I was hoping that someone would be able to point me in the
right direction here. Anything from examples to tutorials would help.

Do you mean that you don't see any WM_NOTIFY message in the target (other) application? You
know that you won't get WM_NOTIFY messages from the target in your C# application, do you?.
Are you sure your hook proc is registered correctly, are you sure the DLL is injected in the
other process?
What message are you posting to the C# application and how do you get at the HWND of the
receiving window?

Willy.

Feb 15 '07 #3

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

Similar topics

1
by: Roman S. Golubin1709176985 | last post by:
Hi, everybody! I create a control inherited from System.Windows.Forms.Control and override OnParentChanged method: public class MyControl : System.Windows.Forms.Control { protected override...
7
by: Will | last post by:
I'm working on a C# Windows Service that needs to monitor serial port communication. Because the .Net framework does not include support for serial communications, I've decided to use the...
1
by: Daniel Bass | last post by:
hey guys. overview --------- I'm designing a messaging system that works on the principle of late binding to the I/O objects, depending on the .Net class libraries present in the local folder....
2
by: Robert Kemp | last post by:
I am creating a non-visible/tray control that monitors other custom controls for changes (among other things). One of the monitored controls is a new textbox that adds functionality to the...
1
by: Jacand4321 | last post by:
I'm trying to audit all the database activities using Server-side trace in SQL Server 2000. Basically I need to get the login information (login Id, Login time etc) along with the name of the...
4
by: Matt Fielder | last post by:
I have a control that the user is able to manually resize --- and it works great. The problem is I need to handle something when the control is done being resized, but not during the resize, so...
1
by: Jo | last post by:
Hi. I have a few questions regd event monitoring. Would appreciate some assistance with this. 1. Does the event monitor only insert data into the event monitoring tables once the connection has...
1
by: Mahita | last post by:
Hi, I am coding a Windows Service in which I am using the "OnCreated" event of FileSystemWatcher class to do some processing when a new file is created in a particular folder. However I have...
1
by: =?Utf-8?B?YnJlbnQ5NjA=?= | last post by:
Environment: ASP.NET 2.0, SQL Server 2005, C#, Visual Studio 2005 In my Session_End event, I am executing a stored procedure to update a database table that is used to log user sessions. When...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.