Unable to set value of a TextBox

Aug 20, 2012 at 4:56 PM
Edited Aug 20, 2012 at 4:57 PM

Hi,

I am trying to set the value of a text box on a Windows Form based app but every time I try I get the following error message:

System.InvalidOperationException: Operation cannot be performed. ---> System.NotImplementedException: The method or operation is not implemented.

Stack Trace:

Accessibility.IAccessible.set_accValue(Object varChild, String pszValue)
MS.Internal.AutomationProxies.Accessible.set_Value(String value)
MS.Internal.AutomationProxies.Accessible.set_Value(String value)
MS.Internal.AutomationProxies.MsaaNativeProvider.SetValue(String val)
MS.Internal.AutomationProxies.MsaaNativeProvider.System.Windows.Automation.Provider.IValueProvider.SetValue(String val)
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
MS.Internal.Automation.UiaCoreApi.CheckError(Int32 hr)
System.Windows.Automation.ValuePattern.SetValue(String value)
White.Core.UIItems.UIItem.Enter(String value) in c:\....: line 364
White.Core.UIItems.TextBox.set_Text(String value) in c:\.....

I have used this function before without any issues so just wondering if anyone has seen this before or would have any understanding as to why it is happening?

Thanks in advance!

Aug 21, 2012 at 7:50 AM

Hi

it seems that this control looks like a Textbox but is a "custom" control. The message says that the msaa interface to set  the value is not implemented by the developer and so these message is thrown.

 

You can try to click in the textbox and use the keyboard class to enter text.

 

Throndorin

Aug 21, 2012 at 2:17 PM

Thanks for your help. I used Keyboard.Instance.Enter(string) instead and it works fine.