Visual Studio Development Bookmark and Share   
 index > Visual Studio Extensibility > Tool window with no title bar
 

Tool window with no title bar

Hi,

I am creating a Visual Studio Extensibility Package.  I am trying to create a ToolWindow which has no title bar.  I don't want the Minimize, Maximize or Close buttons to be available.  I want the ToolWindow to be closed when the user clicks away from the window.

I have created a class which inherits from ToolWindowPane, and I am hosting my UserControl in that.  But I can't find a way to achieve the desired effect.

I just want to display some information to the user, which can be easily dismissed. 

Is a ToolWindow even the correct control to be using? 

Regards,

Michael
MichaelRichardson  Monday, October 05, 2009 5:56 AM
Hello Michael,

I don't think a toolwindow is the proper UI item for that purpose and I think it won't work as you want. A MessageBox (for simple text) or modal form (for something more complex) would be a much better UI.

FWIW, notice that dismissing windows clicking away is not very intuitive, discoverable or user-friendly. Users do expect a button in a window to close it (IMHO)
MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about VS extensibility: http://msmvps.com/blogs/carlosq/
Carlos Quintero - MVP  Monday, October 05, 2009 12:32 PM
Hi MichaelRichardson,

Based on my understanding, you can try to use ToolTip control to achieve this, which represents a small rectangular pop-up window that displays a brief description of a control's purpose when the user rests the pointer on the control. For more information, please refer to this link:

http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.aspx

If I misunderstood you, or you have any questions, please let me know.

Best Regards,
Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Nancy Shao  Monday, October 12, 2009 7:31 AM
Hello Michael,

I don't think a toolwindow is the proper UI item for that purpose and I think it won't work as you want. A MessageBox (for simple text) or modal form (for something more complex) would be a much better UI.

FWIW, notice that dismissing windows clicking away is not very intuitive, discoverable or user-friendly. Users do expect a button in a window to close it (IMHO)
MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about VS extensibility: http://msmvps.com/blogs/carlosq/
Carlos Quintero - MVP  Monday, October 05, 2009 12:32 PM
Thanks for your reply Carlos.

The effect I'm going for is similar to what ReSharper has achieved.  For example, if you use ReSharper to 'Go to inheritors', and no inheritors exist, a simple message is displayed which is easily dismissed by clicking back on the code-editor window.  The message has no chrome\frame surrounding it, and no toolbar or buttons. 

Is there a feasible way to achieve this? (given I don't quite have the resources of JetBrains at my disposal).

I have tried using the message box, but it just feels a little clumsy in comparison.  
MichaelRichardson  Tuesday, October 06, 2009 1:42 AM
Hi MichaelRichardson,

Based on my understanding, you can try to use ToolTip control to achieve this, which represents a small rectangular pop-up window that displays a brief description of a control's purpose when the user rests the pointer on the control. For more information, please refer to this link:

http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.aspx

If I misunderstood you, or you have any questions, please let me know.

Best Regards,
Nancy
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Nancy Shao  Monday, October 12, 2009 7:31 AM

You can use google to search for other answers

Custom Search

More Threads

• Error upgrading VB 6.0 Project to VB .NET Project
• New Macros for Build Commands and Properties (ala NMAKE)
• How to use IVsProfferCommands.FindCommandBar for finding toolbars?
• Operating System
• Simple change
• Output from devenv at command line
• FIPS 140-2 allow Web app
• How Do I Subscribe to Item Events
• UnauthorizedAccessException when trying to get DTE object from ROT
• ProjectAggregator.dll, is it required? causing BadImageFormatException