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 / IDE / May 2005

Tip: Looking for answers? Try searching our database.

passing data to Toolwindow

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Krish - 10 May 2005 12:28 GMT
I have implemented an Add-in that opens a toolwindow when user clicks a
commandbar button. I need to pass data to the toolwindow every time user
clicks the commandbar button.
Currently I have implemented part of it by creating static variables in
Connect class of the Add-in reading them from onload event of the user
control hosted inside shim control. Everything looks good first time. As
Toolwindow gets loaded only once, second time onwards load event does not
happen and I could not refresh user control with new values. There must be a
way to dynamically pass data to Toolwindow, but I could not find how. Please
let me know if anybody did this before.
Regards,
Krishna
Krish - 10 May 2005 12:34 GMT
The work around for this is Close and activate toolwindow but it causes
flickering. Is there a clean way of doing this?
Thanks,
Krish

> I have implemented an Add-in that opens a toolwindow when user clicks a
> commandbar button. I need to pass data to the toolwindow every time user
[quoted text clipped - 8 lines]
> Regards,
> Krishna
Carlos J. Quintero [.NET MVP] - 10 May 2005 14:50 GMT
When you create the toolwindow via CreateToolwindow, you get a EnvDTE.Window
instance and a usercontrol instance (hosted inside the toolwindow). You must
hold a reference to the usercontrol in your connect class. Add a method to
the usercontrol, and call it whenever the commandbar button is clicked
through that reference. The window and the usercontrol must be created only
if the reference is null (the first time). Otherwise, you have only to make
visible the toolwindow.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

>I have implemented an Add-in that opens a toolwindow when user clicks a
> commandbar button. I need to pass data to the toolwindow every time user
[quoted text clipped - 10 lines]
> Regards,
> Krishna
Krish - 12 May 2005 05:40 GMT
Thank you.
Krish

> When you create the toolwindow via CreateToolwindow, you get a EnvDTE.Window
> instance and a usercontrol instance (hosted inside the toolwindow). You must
[quoted text clipped - 18 lines]
> > Regards,
> > Krishna

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.