I mean, the Validating events were supposed to be there to solve the problem with the Lost Focus/Set Focus issue. Plus, I'm not trying to get it to work, I'm trying really to figure out if this is intended operation, and if so why.
Validation is a very useful feature in VB6, which you implement in a variety of situations. So while coding for the login and registration forms, it is a must to include the validations for the controls on the forms.
You have to write the code in the Validate event procedure of the control where you input the data, for example, on the Text Box control.
I'm trying to get a control(combobox) to fire it's validating event by giving it the focus and then removing the focus but this doesn't seem to work.
Does anyone know a better way (by which I mean one that works)?
To cancel this data validation event, we should input a valid editor value or cancel the data validation process.
In the following example, we are going to demonstrate how to validating data for a Property Grid item using C# code.
After that, you move to another control, for example, to a Command Button, a Text Box or any other.
That means the first control where you entered the data lost the input focus, and the other control is about to receive the focus.
The problem is that we don’t receive the focusin/out events unless the control attaches any of the validating or focus events.