Loading ...
Sorry, an error occurred while loading the content.

ToolWindows

Expand Messages
  • blacksheep_dz
    Using the VSUserControlHostLib to create a design-time toolwindow to host a usercontrol in VB.net works fine. However, only in design time, I wish to create a
    Message 1 of 5 , Apr 1, 2002
    • 0 Attachment
      Using the VSUserControlHostLib to create a design-time toolwindow to
      host a usercontrol in VB.net works fine. However, only in design
      time, I wish to create a toolwindow that can be used during debug.

      An example would be, if a developer is in design-mode the immediate
      window is not avialable; ONLY during debug-mode is the immediate
      toolwindow available.

      How do I create a toolwindow during debug-mode and at the same time
      disable design-time toolwindows?

      Sleepless in Tulsa
      dz@...
    • Stephen Martin
      Hi, You ve probably already figured this one out but just in case you haven t: OnConnect - Create your tool window (but don t show it) - Retrieve the
      Message 2 of 5 , Apr 7, 2002
      • 0 Attachment
        Hi,

        You've probably already figured this one out but just in case you haven't:

        OnConnect
        -> Create your tool window (but don't show it)
        -> Retrieve the DTEEvents object from applicationObject.Events.DTEEvents and wire up the ModeChanged event.

        DTEEvents.ModeChanged
        -> to Debug: Show Window
        -> to Design: Hide Window

        You could also show it in the OnConnect but leave your UserControl disabled and then Enable/Disable it(using a property of your UserControl) in the ModeChanged event (or even create it/destroy it every ModeChanged).

        By the way, despite what the documentation says you don't seem to need to use VSUserControlHostLib.

        ----- Original Message -----
        From: blacksheep_dz
        To: vsnetaddin@yahoogroups.com
        Sent: Monday, April 01, 2002 7:24 PM
        Subject: [vsnetaddin] ToolWindows


        Using the VSUserControlHostLib to create a design-time toolwindow to
        host a usercontrol in VB.net works fine. However, only in design
        time, I wish to create a toolwindow that can be used during debug.

        An example would be, if a developer is in design-mode the immediate
        window is not avialable; ONLY during debug-mode is the immediate
        toolwindow available.

        How do I create a toolwindow during debug-mode and at the same time
        disable design-time toolwindows?

        Sleepless in Tulsa
        dz@...


        Yahoo! Groups Sponsor
        ADVERTISEMENT




        Replies go to the entire list. Visit http://groups.yahoo.com/group/vsnetaddin to unsubscribe, search message archives, or change delivery options.



        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



        [Non-text portions of this message have been removed]
      • Dennis Zweigle
        Stephen, What host would I for a usercontrol if I stop using the VSUserControlHostLib dll to create the toolwindow? DZ ...
        Message 3 of 5 , Apr 13, 2002
        • 0 Attachment
          Stephen,

          What host would I for a usercontrol if I stop using
          the VSUserControlHostLib dll to create the toolwindow?

          DZ

          --- Stephen Martin <smartin@...> wrote:
          > Hi,
          >
          > You've probably already figured this one out but
          > just in case you haven't:
          >
          > OnConnect
          > -> Create your tool window (but don't show it)
          > -> Retrieve the DTEEvents object from
          > applicationObject.Events.DTEEvents and wire up the
          > ModeChanged event.
          >
          > DTEEvents.ModeChanged
          > -> to Debug: Show Window
          > -> to Design: Hide Window
          >
          > You could also show it in the OnConnect but leave
          > your UserControl disabled and then Enable/Disable
          > it(using a property of your UserControl) in the
          > ModeChanged event (or even create it/destroy it
          > every ModeChanged).
          >
          > By the way, despite what the documentation says you
          > don't seem to need to use VSUserControlHostLib.
          >
          > ----- Original Message -----
          > From: blacksheep_dz
          > To: vsnetaddin@yahoogroups.com
          > Sent: Monday, April 01, 2002 7:24 PM
          > Subject: [vsnetaddin] ToolWindows
          >
          >
          > Using the VSUserControlHostLib to create a
          > design-time toolwindow to
          > host a usercontrol in VB.net works fine. However,
          > only in design
          > time, I wish to create a toolwindow that can be
          > used during debug.
          >
          > An example would be, if a developer is in
          > design-mode the immediate
          > window is not avialable; ONLY during debug-mode is
          > the immediate
          > toolwindow available.
          >
          > How do I create a toolwindow during debug-mode and
          > at the same time
          > disable design-time toolwindows?
          >
          > Sleepless in Tulsa
          > dz@...
          >
          >
          > Yahoo! Groups Sponsor
          > ADVERTISEMENT
          >
          >
          >
          >
          > Replies go to the entire list. Visit
          > http://groups.yahoo.com/group/vsnetaddin to
          > unsubscribe, search message archives, or change
          > delivery options.
          >
          >
          >
          > Your use of Yahoo! Groups is subject to the Yahoo!
          > Terms of Service.
          >
          >
          >
          > [Non-text portions of this message have been
          > removed]
          >
          >


          __________________________________________________
          Do You Yahoo!?
          Yahoo! Tax Center - online filing with TurboTax
          http://taxes.yahoo.com/
        • Quintero Vivar, Carlos Javier
          Just pass a MyUserControl variable to the last parameter of CreateToolWindow. Carlos ... De: Dennis Zweigle [mailto:blacksheep_dz@yahoo.com] Enviado el:
          Message 4 of 5 , Apr 14, 2002
          • 0 Attachment
            Just pass a MyUserControl variable to the last parameter of
            CreateToolWindow.

            Carlos

            -----Mensaje original-----
            De: Dennis Zweigle [mailto:blacksheep_dz@...]
            Enviado el: sábado, 13 de abril de 2002 17:49
            Para: vsnetaddin@yahoogroups.com
            Asunto: Re: [vsnetaddin] ToolWindows


            Stephen,

            What host would I for a usercontrol if I stop using
            the VSUserControlHostLib dll to create the toolwindow?

            DZ

            --- Stephen Martin <smartin@...> wrote:
            > Hi,
            >
            > You've probably already figured this one out but
            > just in case you haven't:
            >
            > OnConnect
            > -> Create your tool window (but don't show it)
            > -> Retrieve the DTEEvents object from
            > applicationObject.Events.DTEEvents and wire up the
            > ModeChanged event.
            >
            > DTEEvents.ModeChanged
            > -> to Debug: Show Window
            > -> to Design: Hide Window
            >
            > You could also show it in the OnConnect but leave
            > your UserControl disabled and then Enable/Disable
            > it(using a property of your UserControl) in the
            > ModeChanged event (or even create it/destroy it
            > every ModeChanged).
            >
            > By the way, despite what the documentation says you
            > don't seem to need to use VSUserControlHostLib.
            >
            > ----- Original Message -----
            > From: blacksheep_dz
            > To: vsnetaddin@yahoogroups.com
            > Sent: Monday, April 01, 2002 7:24 PM
            > Subject: [vsnetaddin] ToolWindows
            >
            >
            > Using the VSUserControlHostLib to create a
            > design-time toolwindow to
            > host a usercontrol in VB.net works fine. However,
            > only in design
            > time, I wish to create a toolwindow that can be
            > used during debug.
            >
            > An example would be, if a developer is in
            > design-mode the immediate
            > window is not avialable; ONLY during debug-mode is
            > the immediate
            > toolwindow available.
            >
            > How do I create a toolwindow during debug-mode and
            > at the same time
            > disable design-time toolwindows?
            >
            > Sleepless in Tulsa
            > dz@...
            >
            >
            > Yahoo! Groups Sponsor
            > ADVERTISEMENT
            >
            >
            >
            >
            > Replies go to the entire list. Visit
            > http://groups.yahoo.com/group/vsnetaddin
            <http://groups.yahoo.com/group/vsnetaddin> to
            > unsubscribe, search message archives, or change
            > delivery options.
            >
            >
            >
            > Your use of Yahoo! Groups is subject to the Yahoo!
            > Terms of Service.
            >
            >
            >
            > [Non-text portions of this message have been
            > removed]
            >
            >


            __________________________________________________
            Do You Yahoo!?
            Yahoo! Tax Center - online filing with TurboTax
            http://taxes.yahoo.com/ <http://taxes.yahoo.com/>


            Yahoo! Groups Sponsor

            ADVERTISEMENT

            <http://rd.yahoo.com/M=217097.2003762.3481930.1261774/D=egroupweb/S=17050072
            07:HM/A=1042587/R=0/*http://service.bfast.com/bfast/click?bfmid=29150849&sit
            eid=39282504&bfpage=account>

            <http://us.adserver.yahoo.com/l?M=217097.2003762.3481930.1261774/D=egroupmai
            l/S=1705007207:HM/A=1042587/rand=371369489>

            Replies go to the entire list. Visit
            http://groups.yahoo.com/group/vsnetaddin
            <http://groups.yahoo.com/group/vsnetaddin> to unsubscribe, search message
            archives, or change delivery options.



            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
            <http://docs.yahoo.com/info/terms/> .




            [Non-text portions of this message have been removed]
          • blacksheep_dz
            I m having problems trying using my add-in s ToolWindow in the auto hide mode. It always wants to place it s window in the upper left hand corner of the
            Message 5 of 5 , Sep 3, 2002
            • 0 Attachment
              I'm having problems trying using my add-in's ToolWindow in the
              auto hide mode. It always wants to place it's window in the upper
              left
              hand corner of the screen and then starts bouncing back and forth
              between
              hidden and displayed. If I finally get it to display in the correct
              place
              it doesn't show anything. This problem doesn't occur if autohide
              mode is false.


              Any ideas?

              DZ


              The code looks like this:

              Class Level declaration- Dim windowCodeDrop As EnvDTE.Window

              My Exec code calls ActivateCodeDropToolWindow


              Private Sub ActivateCodeDropToolWindow()
              Try
              Me.windowCodeDrop.Activate()
              Me.windowCodeDrop.Visible = True
              Catch caughtException As System.Exception
              Me.CreateCodeDropToolWindow()
              End Try
              End Sub
              Private Sub CreateCodeDropToolWindow()
              Try
              Dim objTemp As Object
              Dim objcontrol1 As
              VSUserControlHostLib.IVSUserControlHostCtl
              Dim guid4Data As String = "{94DCDF2D-7AE9-4980-8CCB-
              BDC0EC738507}"
              Me.windowCodeDrop =
              Me.applicationObject.Windows.CreateToolWindow
              (Me.addInInstance, "VSUserControlHost.VSUserControlHostCtl",
              GlobalDeclarations.GetToolWindowCaption
              (GlobalDeclarations.enToolWindows.CodeDrop), guid4Data, objTemp)

              Dim asm As System.Reflection.Assembly =
              System.Reflection.Assembly.GetExecutingAssembly()

              'When using the hosting control, you must set visible to
              true before calling HostUserControl,
              ' otherwise the UserControl cannot be hosted properly.

              Me.windowCodeDrop.Visible = True
              objcontrol1 = CType(objTemp,
              VSUserControlHostLib.IVSUserControlHostCtl)


              objcontrol1.HostUserControl
              (asm.Location, "CodeDropAddin.ucCodeDropWithLinks")
              Me.windowCodeDrop.Caption = "Hello World - Free"
              Catch eException As System.Exception
              Throw New System.Exception("Unable to create tool window
              for Code Drop!", eException)
              End Try
              End Sub
            Your message has been successfully submitted and would be delivered to recipients shortly.