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 / December 2004

Tip: Looking for answers? Try searching our database.

Passing Messages between ToolWindows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve_Schreck - 13 Dec 2004 21:07 GMT
I suppose I really have two questions. First, I am trying to implement a
VSIP feature where a user can click on a control in a ToolWindow and have
that event notify another toolwindow.

Is it possible to send event information AND arguments between toolwindows?
I've found that setting up a new CommandID and routing it through the
MenuCommandService will allow simple Commands to be sent, but not args.

As part of an attempted workaround, I've tried to get the Package from
within the toolwindow using:

Package pkg = (Package)this.GetService(typeof(Package)), but pkg is ALWAYS
null. I know that the toolwindow implements IServiceProvider.

So my second question is, how can I get the Package object from a toolwindow?

Is there a way to enumerate the services available on a component or
container?
Gaston Milano - 30 Dec 2004 02:57 GMT
The first toolwindow should register a new service and promote it (using
addservice).
So after that the second toolwindow do a request for this service (using
GetService). And use this service in order to comunicate with the other
toolwindow.

If both toolwindows are in the same package they can access to the package
by a static member of the package. For example

class MyPackage : Package
{
   public static MyPackage Package;

   public override void Initialize()
  {
      Package = this;
  }

}

> I suppose I really have two questions. First, I am trying to implement a
> VSIP feature where a user can click on a control in a ToolWindow and have
[quoted text clipped - 14 lines]
> Is there a way to enumerate the services available on a component or
> container?

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.