I was debugging what I thought was a strange exception the other day. The exception was an InvalidOperationException and the message was "Object is currently in use elsewhere". Unless you're familiar with this exception, it really doesn't offer much as to why the exception is occurring...
The TextBox class supports undoing the last action--inherited from TextBoxBase . Normally the user does this by pressing the undo key (Ctrl-Z if your keyboard doesn't have a specific Undo key) or by selecting "Undo" from the context menu. The last action can also be undone programmatically by calling...
I was throwing together some demo code that involved creating a control at runtime, that I wanted docked in a certain way on the parent Form. I could have pre-created the control in the designer and hidden it--to be made visible instead of creating it--but, that's not the situation I was in. Simply creating...