Link to home
Start Free TrialLog in
Avatar of Karen Wilson
Karen WilsonFlag for United States of America

asked on

How do I validate an elementhost in a windows form application

I need to validate that there is a information in an elementhost that I have put in a windows form application.

I can see what I want when I drill down inside the child and go to text but I can't point to it in this code.  Here is the code I am using.  

Any suggestions would be much appreciated!!

Thanks.


  ElseIf control.GetType.ToString = "System.Windows.Forms.Integration.ElementHost" Then
            Dim thisString As System.Windows.Forms.Integration.ElementHost = CType(control, Integration.ElementHost)
            If thisString.Child Is "" Then
                MessageBox.Show(thisString.Tag.ToString & " is a required field.", Title)
                thisString.Select()
                Return False
            Else
                Return True
            End If
ASKER CERTIFIED SOLUTION
Avatar of Karen Wilson
Karen Wilson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial