Visual Studio Developer Center >
Visual Studio Forums
>
Visual Studio Extensibility
>
Add-In ToolWindow not saing its dock state, position, size
Add-In ToolWindow not saing its dock state, position, size
- i create the toolwindow with Windows2.CreateToolWindow2
when the OnStartupComplete call
if i never open/create a solution/project but immedialy exit the VS after setting(drag and drop) it's dock/position/size
the state is saved and restore next time i start the VS
but it is not, when I exit the VS after create/open any project/solution
any idea?
thank you very much
All Replies
- Hello,
Unfortunately, I tried it in VS2008 but cannot reproduce this problem.
Could you please tell me which version of VS you are trying? and show me some code of the ToolWindow's creation.
Thanks,
Wesley
Please 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. - here the code how i create the toolwindow
object programmableObject = null; string guidString = "{ED965D4A-C724-404e-A513-F93A06A9DDD1}"; Windows2 windows2 = (Windows2)_applicationObject.Windows; Assembly asm = Assembly.GetExecutingAssembly(); this.panel = windows2.CreateToolWindow2(_addInInstance, asm.Location, "VSAddins.Viewer", "Viewer", guidString, ref programmableObject);
the VSAddins.Viewer are extend of UserControl
I not sure why, but it seem the creator of Ora also met this problem
http://www.codeplex.com/ora
the problem in short, the custom created tool window not saved it position and dock state
thankyou very much - Hello,
Thanks for your information.
Your code looks the same with what I tried, it's odd that I cannot reproduce it but the Ora toolwindows does. I will investigate the Ora, if I find anything, I will let you know.
Sincerely,
Wesley
Please 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. - Hello,
First, ensure that you are using the OnConnection / OnStartupComplete methods correctly:
HOWTO: Use correctly the OnConnection method of a Visual Studio add-in
http://www.mztools.com/articles/2008/MZ2008004.aspx
Then, apparently your code is correct (you are using the same Guid). So, could you post the whole code of your OnConnection / OnStartupComplete methods to see if you are missing something?
MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about VS extensibility: http://msmvps.com/blogs/carlosq/


