
Public class ErrorProviderFixManager : IDisposable Protected override void Dispose( bool disposing) Public ErrorProviderFixed(IContainer container) Public ErrorProviderFixed(ContainerControl parentControl) MToolTipFix = new ErrorProviderFixManager( this) Public class ErrorProviderFixed : ErrorProviderĮrrorProviderFixManager mToolTipFix = null Then, replace all instances of with ErrorProviderFixed. // constructor, which will started a timer that will Private Hashtable mHashOfNativeWindows = new Hashtable() Private Timer mTmrCheckHandelsProc = null Private ErrorProvider mTheErrorProvider = null keep the errorProviders tooltip window up-to-date and enabled. MTmrCheckHandelsProc.Tick += new EventHandler(tmr_CheckHandels) / /// public ErrorProviderFixManager(ErrorProvider ep) / /// To do: I would like to do this without a timer (Suggestions welcome). if the user is able to hover over another error provider message for / you click on an error provider, while its tooltip is displayed, / /// Resets the error provider, error messages. // This method checks to see if the error provider's tooltip window has MTheErrorProvider.SetError(control, str) MTheErrorProvider.SetError(control, " ") MTheErrorProvider.BlinkStyle = ErrorBlinkStyle.NeverBlink String str = mTheErrorProvider.GetError(control) ĮrrorBlinkStyle prev = mTheErrorProvider.BlinkStyle MTheErrorProvider.GetError(control).Length > 0) If (mTheErrorProvider.GetError(control) != null & If (!( bool)GetFieldValue(hashRes, " toolTipShown")) Hashtable hashRes = (Hashtable)GetFieldValue(mTheErrorProvider, " items") įoreach (Control control in hashRes.Keys) / Email me at: private void RefreshProviderErrors() / /// Todo: I would like to find an easier way to fix this. If (nativeWindow != null & hook.Handle = IntPtr.Zero)įoreach (ErrorProviderNativeWindowHook hook NativeWindow nativeWindow = GetFieldValue(hashRes, Hook = new ErrorProviderNativeWindowHook() (Hashtable)GetFieldValue(mTheErrorProvider, " windows") ĮrrorProviderNativeWindowHook hook = null If (mTheErrorProvider.ContainerControl = null) / /// /// void tmr_CheckHandels( object sender, EventArgs e) / /// If there is some sort of change, it also calls the RefreshProviderErrors, / changed and if it updates this Native window with the new handle.


// the object instance /// the name of the field, which we want to get /// the value of the private field private object GetFieldValue( object instance, string name) / /// A helper method, which allows us to get the value of private fields.
