"UpdateEvent"

C

Chad Z. Hower

I'm looking for some kind of form level event that I can hook/add/use
to tell me when ever some input control has changed its state. As a
hack currently I set KeyPreview to true and hooked the KeyPress event.
This works great for text boxes etc, but if a user uses the mouse to
select someting in a listbox it doesnt catch it of course.

The idea is something like this, in the even I want to check the state
of the inputs and enable disable for example the Save button. Delphi
had a neat way to do this with actionlist and I know there are free and
3P action lists for .NET, but this is an existing WinForms app and I
cant redo it. I just need a basic event I can hook to properly
enable/disable controls. The other "hack" option is a timer, but thats
pretty ugly too.

I've also considered hooking into the windows message pipe and ignoring
obvious ones like WM_Paint etc, but again I'd like to avoid this and
find something else. Anyone have any suggestions?

--
Chad Z. Hower
Microsoft Regional Director
"Programming is an art form that fights back"
http://www.KudzuWorld.com/
Need a professional technical speaker at your event?
http://www.woo-hoo.net
 
C

Chad Z. Hower

Chad said:
I'm looking for some kind of form level event that I can hook/add/use
to tell me when ever some input control has changed its state. As a

Just after I posted this I decided to check on of the free ActionList
components to see what it uses. Application.Idle for anyone else who is
interested.

Will wrap that to auto unlink the forms that use it. Should work fine
that way.

--
Chad Z. Hower
Microsoft Regional Director
"Programming is an art form that fights back"
http://www.KudzuWorld.com/
Need a professional technical speaker at your event?
http://www.woo-hoo.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top