i have a section of a form where all of it's controls are dynamically
generated...the parent form is - and needs to be - detached from some of the
activities of the class that generates/manages these controls. if there is
only one managed control, then the class has no "known" control to set the
focus on. if i have control.validating event code to be run in a managed
control and the parent form has code behind an object's click event...and
that object *can't* receive focus (like a picturebox used in liue of a
button) then that code will run w/o executing the managed control's
validating code. this is bad since the object's click event could call the
managed class' save method.
if i can just tell the control to loose focus then the validation code will
execute...all i will have to create is a method to have the managing class
Update...or something like that. otherwise, i'll have to get more intimate
than i'd like w/ the parent form.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:er**************@TK2MSFTNGP09.phx.gbl...
"steve" <as*@abc.com> scripsit: what's the equivalent to sendmessage?
i want to explicitly kill the focus of a control.
Call the 'Focus' method of an other control.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>