How to start Tool Window Hidden?

Docking/MDI for Windows Forms Forum

Posted 18 years ago by Michael Wheat - IT-Developer, Auto Salvage Auction Inc
Avatar
Hi,

I was wondering if it is possible to start my app with the tool window already hidden. I can hide it in code, but the user can see the tool window hiding. I want it hidden on start-up.

Thank you,
Mike

Comments (5)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Mike,

I assume you are not loading a layout and are referring to what you design in the designer, correct? Where are you hiding the tool window? If you do it after the InitializeComponent code but still in the constructor of the parent form, the end user shouldn't see anything since the form isn't visible at that point.


Actipro Software Support

Posted 18 years ago by Michael Wheat - IT-Developer, Auto Salvage Auction Inc
Avatar
Hi Support,

Here is what I have in the constructor. It is not working the way you describe.

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

' Hide the toolbars
Me.ToolWindowSearch.AutoHide()
End Sub

The form display itself and then you see the toolbar closing.

Thank you,
Mike
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Ahh sorry, I thought you meant hiding (a.k.a. closing), not auto-hide.

Calling the AutoHide method will do the slide animation. Try this instead:
Me.ToolWindowSearch.State = ToolWindowState.AutoHide


Actipro Software Support

Posted 18 years ago by Michael Wheat - IT-Developer, Auto Salvage Auction Inc
Avatar
Hi Support,

Ahh, didn't see that property.

I see it is not available to set at design time.

Thank you,
Mike
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Right the problem with the Visual Studio designer is that in order for Controls to serialize to code properly, they can't be truly hidden or floating, etc. So some dock states are unavailable. That's why we don't show the State property in the designer.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.