Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / August 2004

Tip: Looking for answers? Try searching our database.

Persisting ToolWindow state

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ciprian Jichici - 02 Aug 2004 13:32 GMT
Hello,

I have the following problem: I wrote a managed package which adds a new
ToolWindow to VS. Inside the toolwindow, I can connect to different servers
(just like adding servers in ServerExplorer).
I'd like to get the chance of persisting somehow the list of connected
servers so I can load it the next time my window is created. I assumed this
can be achieved inside IVsWindowPane.SaveViewState, but unfortunatelly VS
does not call this method on my window.

Is there something I need to do in order to be called on this method or
there is another way this can be done?

Thanks a lot,
Ciprian Jichici
Genisoft
"Ed Dore [MSFT]" - 02 Aug 2004 23:17 GMT
Hi Ciprian,

In reviewing the code, I could only locate an invocation of this function
that occurs when persisting data to a project's SUO file. The function in
question retrieves the frame window's docview data pointer from the
VSFPROPID_DocView property (which doesn't appear to be a valid property for
toolwindows). Then QI's for IVsWindowPane and calls SaveViewPane. I'm not
certain if this particular function get's called outsidewhere you actually
have an solution loaded yet.

You could try loading/saving your custom data in the IVsWindowPane's
CreatePaneWindow and CloasePane methods though.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.
"Ed Dore [MSFT]" - 09 Aug 2004 22:25 GMT
Hi Ciprian,

I did get confirmation on this from the dev team.
IVsWindowPane::SaveViewPane only gets called for document windows. For
toolwindows, VS only persists the layout information. You'll need to handle
this manually with CreatePaneWindow and ClosePane on your IVsWindowPane
implementation.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.