473,324 Members | 2,196 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,324 software developers and data experts.

Track all enter and leave Message from Controls

Hi there

it is possible to track all "enter" and "leave" messages from all Forms
controls with one routine?

Peter
Nov 16 '05 #1
3 1670
Peter,

When you say all forms, do you mean all forms in your application? If
this is the case, then I would say yes. You could do it with a windows
hook, or by handling all windows messages that go to the forms, but there is
an easier way. All you have to do is have one event handler method, and
attach it to all of the form's Enter and Leave events. That way, you have
one handler that handles the event for everything that it is attached to.

This is where the beauty of the event model really shines, because it
allows you to compact code in this manner, and write more generic routines,
as you want to do in your situation.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Schneider" <No****@NoMail.de> wrote in message
news:uT**************@TK2MSFTNGP10.phx.gbl...
Hi there

it is possible to track all "enter" and "leave" messages from all Forms
controls with one routine?

Peter

Nov 16 '05 #2
Hi Nicholas

thanks for answer, (sorry) but i mean >>it is possible to track all "enter"
and "leave" messages from all controls on the form.
I try to work with "Extender Providers", and hook into the control.

Peter
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> schrieb
im Newsbeitrag news:%2****************@TK2MSFTNGP10.phx.gbl...
Peter,

When you say all forms, do you mean all forms in your application? If
this is the case, then I would say yes. You could do it with a windows
hook, or by handling all windows messages that go to the forms, but there is an easier way. All you have to do is have one event handler method, and
attach it to all of the form's Enter and Leave events. That way, you have
one handler that handles the event for everything that it is attached to.

This is where the beauty of the event model really shines, because it
allows you to compact code in this manner, and write more generic routines, as you want to do in your situation.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Schneider" <No****@NoMail.de> wrote in message
news:uT**************@TK2MSFTNGP10.phx.gbl...
Hi there

it is possible to track all "enter" and "leave" messages from all Forms
controls with one routine?

Peter


Nov 16 '05 #3
Peter,

Yes, this is possible. If you have access to the Form, then you can
cycle through the Controls collection, and attach to every Enter and Leave
event on the form. The Enter and Leave events are defined on the Control
level.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Schneider" <No****@NoMail.de> wrote in message
news:Oo**************@TK2MSFTNGP10.phx.gbl...
Hi Nicholas

thanks for answer, (sorry) but i mean >>it is possible to track all "enter" and "leave" messages from all controls on the form.
I try to work with "Extender Providers", and hook into the control.

Peter
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> schrieb
im Newsbeitrag news:%2****************@TK2MSFTNGP10.phx.gbl...
Peter,

When you say all forms, do you mean all forms in your application? If this is the case, then I would say yes. You could do it with a windows
hook, or by handling all windows messages that go to the forms, but there
is
an easier way. All you have to do is have one event handler method, and
attach it to all of the form's Enter and Leave events. That way, you

have one handler that handles the event for everything that it is attached to.
This is where the beauty of the event model really shines, because it allows you to compact code in this manner, and write more generic

routines,
as you want to do in your situation.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Peter Schneider" <No****@NoMail.de> wrote in message
news:uT**************@TK2MSFTNGP10.phx.gbl...
Hi there

it is possible to track all "enter" and "leave" messages from all Forms controls with one routine?

Peter



Nov 16 '05 #4

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

Similar topics

8
by: hokiegal99 | last post by:
I don't understand how to use a loop to keep track of user input. Could someone show me how to do what the program below does with a loop? Thnaks! ---------------------------- #Write a...
5
by: | last post by:
(subject included - apologies) <jason@catamaranco.com> wrote in message news:... > Is there a simple way to track users leaving our site to vendors whose wares > we have advertised as a banner...
4
by: Ali Baba | last post by:
Hi, I need the enter key to work as a tab so that the focus goes to the next control. I don't want to write a KEY_PRESS handler for all controls. Is there a better way? IMPORTANT: I only want...
2
by: Simon Verona | last post by:
I have a usercontrol with code in the "leave" event which updates the final data back into a database. This works fine except if I have a default "accept" button on a form and invoke it by...
1
by: geneb | last post by:
I've got a number of tabs with text boxes on them. When you hit the last textbox on a tab, it checks to see if the next tab is a valid destination, then goes to it if so. Unfortunately, when...
1
by: theinvisibleGhost | last post by:
Is there an underlying interface anywhere that .NET form controls use to include the Enter, Leave, GotFocus, and LostFocus events? I have a problem where I've got a usercontrol which is being...
7
by: Marc | last post by:
Hi, I want my user to be able to rename a button control by selcting rename from a menu. This then opens a text box in which to enter the new name in. I want the button control to...
8
by: =?Utf-8?B?TGlzYUNvbnN1bHQ=?= | last post by:
I have a data entry application. Due to ease and location, the users utilizie the enter key to move from field to field, rather than the tab key. Depending on the data they enter into a field,...
24
by: MichaelK | last post by:
Who knows how to prevent submitting a form on the press Enter button before all fields on the form are filled up. People just enter the first field hit Enter and it submits the form and doing...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.