We have a custom pipeline component for BizTalk where we can set some properties (through the properties window). One of the properties makes use of a windows form (where the user can add some values). Now the problem is that if a user wants to copy something from visual studio, he has to first close the window, copy the text and open the window again. This is because you cant click outside the windows form (it's stuck inside visual studio). Is there anyway to fix this, so you can select text from visual studio? Maybe change the window style or so?
Thx
Creating a custom UI TypeEditor to display a dialog box in order to interact with the Visual Studio property grid is done by implementing the IWindowsFormsEditorService.
Unfortunately, this interface makes use of the
ShowDialog
method which does not expose an easy means to display modeless dialogs. Only modal dialogs are supported, which means that you cannot indeed copy values from any other areas of Visual Studio while editing this specific property that invokes a modal dialog.However, if you are prepared to do some heavy lifting and dirty work, you can sort of achieve what you want by using the
DropDownControl
andCloseDropDown
methods instead. The idea is to display a modeless dialog yourselves in a separate thread and block until the user dismisses the dialog. You will need to resort to synchronization primitives for this to work. A similar example for a modeless color picker dialog can be found here.http://www.codeproject.com/KB/selection/WinFormsColorEditor.aspx