I have code attached to the 'Validating' event of a TextBox (called when the user makes a change to the field). When I fill this texbox manually in code, I would like to make the same code execute as if the user had typed it in.

I can't call txtName_Validating() because it needs the 'sender' and 'e' arguments. I don't even know what this is called to look it up on-line. Can anyone shed some light...

Thanks
Denise

Re: Simple Question: Make an Event Occur by hirf-spam-me-here

hirf-spam-me-here
Tue Apr 27 06:12:45 CDT 2004

* =?Utf-8?B?RGVuaXNl?= <anonymous@discussions.microsoft.com> scripsit:
> I can't call txtName_Validating() because it needs the 'sender' and
> 'e' arguments. I don't even know what this is called to look it up
> on-line. Can anyone shed some light...?

You can call the form's 'Validate' method, maybe that's what you are
looking for.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>