How can i increase the mousehover event timer?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc

    #1

    How can i increase the mousehover event timer?

    Hi,
    How can i increase the mousehover event timer?

    AddHandler NewBtn.MouseHov er, AddressOf Shownotes
    Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
    System.EventArg s)
    MsgBox("ttt")

    Thanks!!!

  • rowe_newsgroups

    #2
    Re: How can i increase the mousehover event timer?

    On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
    Hi,
    How can i increase the mousehover event timer?
    >
    AddHandler NewBtn.MouseHov er, AddressOf Shownotes
    Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
    System.EventArg s)
    MsgBox("ttt")
    >
    Thanks!!!
    How about using MouseEnter / MouseLeave instead? If you need a timer,
    MouseEnter could start the timer and MouseLeave could stop it. Setting
    the timer's interval property will set the "hover" time to anything
    you want (as long as it's 1 millisecond or more).

    However looking at your code, I wonder if using tooltips or even a
    helpprovider might be better. What exactly are you trying to
    accomplish?

    Thanks,

    Seth Rowe

    Comment

    • Marc

      #3
      Re: How can i increase the mousehover event timer?

      On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
      On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
      >
      Hi,
      How can i increase the mousehover event timer?
      >
      AddHandler NewBtn.MouseHov er, AddressOf Shownotes
      Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
      System.EventArg s)
      MsgBox("ttt")
      >
      Thanks!!!
      >
      How about using MouseEnter / MouseLeave instead? If you need a timer,
      MouseEnter could start the timer and MouseLeave could stop it. Setting
      the timer's interval property will set the "hover" time to anything
      you want (as long as it's 1 millisecond or more).
      >
      However looking at your code, I wonder if using tooltips or even a
      helpprovider might be better. What exactly are you trying to
      accomplish?
      >
      Thanks,
      >
      Seth Rowe
      Thanks Seth,

      you are right...Tooltip s are much better for me.

      Im just looking at them now. How do i specify which text to show on a
      button in code? i cant find any tooltop options i.e
      newbutton.toolt iptext?

      Comment

      • rowe_newsgroups

        #4
        Re: How can i increase the mousehover event timer?

        On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
        On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
        >
        >
        >
        On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
        >
        Hi,
        How can i increase the mousehover event timer?
        >
        AddHandler NewBtn.MouseHov er, AddressOf Shownotes
        Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
        System.EventArg s)
        MsgBox("ttt")
        >
        Thanks!!!
        >
        How about using MouseEnter / MouseLeave instead? If you need a timer,
        MouseEnter could start the timer and MouseLeave could stop it. Setting
        the timer's interval property will set the "hover" time to anything
        you want (as long as it's 1 millisecond or more).
        >
        However looking at your code, I wonder if using tooltips or even a
        helpprovider might be better. What exactly are you trying to
        accomplish?
        >
        Thanks,
        >
        Seth Rowe
        >
        Thanks Seth,
        >
        you are right...Tooltip s are much better for me.
        >
        Im just looking at them now. How do i specify which text to show on a
        button in code? i cant find any tooltop options i.e
        newbutton.toolt iptext?
        The ToolTip component is what's called a provider component. It
        actually provides a new property to all the applicable control and the
        container (like your form) that you drop it on. With that said, after
        adding a TooTip component (called ToolTip1 by default) each control
        that can have a tooltip will then have a property called "ToolTip on
        ToolTip1" - this is where you should set the text for the tooltip.

        Thanks,

        Seth Rowe

        Comment

        • Marc

          #5
          Re: How can i increase the mousehover event timer?

          On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
          On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
          >
          >
          >
          >
          >
          On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
          >
          On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
          >
          Hi,
          How can i increase the mousehover event timer?
          >
          AddHandler NewBtn.MouseHov er, AddressOf Shownotes
          Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
          System.EventArg s)
          MsgBox("ttt")
          >
          Thanks!!!
          >
          How about using MouseEnter / MouseLeave instead? If you need a timer,
          MouseEnter could start the timer and MouseLeave could stop it. Setting
          the timer's interval property will set the "hover" time to anything
          you want (as long as it's 1 millisecond or more).
          >
          However looking at your code, I wonder if using tooltips or even a
          helpprovider might be better. What exactly are you trying to
          accomplish?
          >
          Thanks,
          >
          Seth Rowe
          >
          Thanks Seth,
          >
          you are right...Tooltip s are much better for me.
          >
          Im just looking at them now. How do i specify which text to show on a
          button in code? i cant find any tooltop options i.e
          newbutton.toolt iptext?
          >
          The ToolTip component is what's called a provider component. It
          actually provides a new property to all the applicable control and the
          container (like your form) that you drop it on. With that said, after
          adding a TooTip component (called ToolTip1 by default) each control
          that can have a tooltip will then have a property called "ToolTip on
          ToolTip1" - this is where you should set the text for the tooltip.
          >
          Thanks,
          >
          Seth Rowe- Hide quoted text -
          >
          - Show quoted text -
          OK thanks

          Comment

          • Marc

            #6
            Re: How can i increase the mousehover event timer?

            On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
            On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
            >
            >
            >
            >
            >
            On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
            >
            On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
            >
            On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
            >
            Hi,
            How can i increase the mousehover event timer?
            >
            AddHandler NewBtn.MouseHov er, AddressOf Shownotes
            Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
            System.EventArg s)
            MsgBox("ttt")
            >
            Thanks!!!
            >
            How about using MouseEnter / MouseLeave instead? If you need a timer,
            MouseEnter could start the timer and MouseLeave could stop it. Setting
            the timer's interval property will set the "hover" time to anything
            you want (as long as it's 1 millisecond or more).
            >
            However looking at your code, I wonder if using tooltips or even a
            helpprovider might be better. What exactly are you trying to
            accomplish?
            >
            Thanks,
            >
            Seth Rowe
            >
            Thanks Seth,
            >
            you are right...Tooltip s are much better for me.
            >
            Im just looking at them now. How do i specify which text to show on a
            button in code? i cant find any tooltop options i.e
            newbutton.toolt iptext?
            >
            The ToolTip component is what's called a provider component. It
            actually provides a new property to all the applicable control and the
            container (like your form) that you drop it on. With that said, after
            adding a TooTip component (called ToolTip1 by default) each control
            that can have a tooltip will then have a property called "ToolTip on
            ToolTip1" - this is where you should set the text for the tooltip.
            >
            Thanks,
            >
            Seth Rowe- Hide quoted text -
            >
            - Show quoted text -
            >
            OK thanks- Hide quoted text -
            >
            - Show quoted text -
            HI,

            I have a set of dynamically created buttons and textbox's. Each button
            is linked to a textbox using the accessiblename property. I want to
            show a button tool tip containing the text box's text. My code so far
            is below although i know this wont work!

            any help is greatly appreciated.


            Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
            System.Object, ByVal e As System.EventArg s) Handles
            AddNewDriverToo lStripMenuItem. Click

            Dim NewBtn As New Button()
            NewBtn.Accessib leName = CStr(Now)
            Me.Controls.Add (NewBtn)


            Dim NewTxt As New RichTextBox
            NewTxt.Accessib leName = NewBtn.Accessib leName
            Me.Controls.Add (NewTxt)

            Dim ctlControl As Control
            Dim s As String
            For Each ctlControl In Me.Controls
            If TypeOf ctlControl Is RichTextBox And
            ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
            s = NewBtn.Text
            End If
            Next

            ToolTip1.SetToo lTip(NewBtn, s)

            Comment

            • rowe_newsgroups

              #7
              Re: How can i increase the mousehover event timer?

              On Mar 2, 9:14 am, "Marc" <marc_cro...@ho tmail.comwrote:
              On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
              >
              >
              >
              On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
              >
              On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
              >
              On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
              >
              On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
              >
              Hi,
              How can i increase the mousehover event timer?
              >
              AddHandler NewBtn.MouseHov er, AddressOf Shownotes
              Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
              System.EventArg s)
              MsgBox("ttt")
              >
              Thanks!!!
              >
              How about using MouseEnter / MouseLeave instead? If you need a timer,
              MouseEnter could start the timer and MouseLeave could stop it. Setting
              the timer's interval property will set the "hover" time to anything
              you want (as long as it's 1 millisecond or more).
              >
              However looking at your code, I wonder if using tooltips or even a
              helpprovider might be better. What exactly are you trying to
              accomplish?
              >
              Thanks,
              >
              Seth Rowe
              >
              Thanks Seth,
              >
              you are right...Tooltip s are much better for me.
              >
              Im just looking at them now. How do i specify which text to show on a
              button in code? i cant find any tooltop options i.e
              newbutton.toolt iptext?
              >
              The ToolTip component is what's called a provider component. It
              actually provides a new property to all the applicable control and the
              container (like your form) that you drop it on. With that said, after
              adding a TooTip component (called ToolTip1 by default) each control
              that can have a tooltip will then have a property called "ToolTip on
              ToolTip1" - this is where you should set the text for the tooltip.
              >
              Thanks,
              >
              Seth Rowe- Hide quoted text -
              >
              - Show quoted text -
              >
              OK thanks- Hide quoted text -
              >
              - Show quoted text -
              >
              HI,
              >
              I have a set of dynamically created buttons and textbox's. Each button
              is linked to a textbox using the accessiblename property. I want to
              show a button tool tip containing the text box's text. My code so far
              is below although i know this wont work!
              >
              any help is greatly appreciated.
              >
              Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
              System.Object, ByVal e As System.EventArg s) Handles
              AddNewDriverToo lStripMenuItem. Click
              >
              Dim NewBtn As New Button()
              NewBtn.Accessib leName = CStr(Now)
              Me.Controls.Add (NewBtn)
              >
              Dim NewTxt As New RichTextBox
              NewTxt.Accessib leName = NewBtn.Accessib leName
              Me.Controls.Add (NewTxt)
              >
              Dim ctlControl As Control
              Dim s As String
              For Each ctlControl In Me.Controls
              If TypeOf ctlControl Is RichTextBox And
              ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
              s = NewBtn.Text
              End If
              Next
              >
              ToolTip1.SetToo lTip(NewBtn, s)
              Well, in your for each loop you are setting the string "s" to the
              value of the button's text, not the RichTextBox's text. Also, this
              loop is only run when the user clicks the
              AddNewDriverToo lStripMenuItem, meaning the tooltips won't be updated
              real time.

              Also you may look at the tag property. With it you can actually set
              the value to an object (like say a certain RichTextBox) and then avoid
              having to do a for each loop to find a particular control. Besides, a
              person using a Accessibility settings will get upset with your
              AccessibleNames :-)

              Instead, I would suggest you add a new usercontrol to your program. To
              this user control add a RichTextBox a Button, and a ToolTip - leave
              the default names for now. Next, add an event handler for the
              RichTextBox's TextChanged Event :

              Private Sub RichTextBox1_Te xtChanged(ByVal sender As
              System.Object, ByVal e As System.EventArg s) Handles
              RichTextBox1.Te xtChanged
              ToolTip1.SetToo lTip(Me.Button1 , RichTextBox1.Te xt)
              End Sub

              This will update the ToolTip for the button whenever the text changes
              in the RichTextBox. After you get everything laid out in the user
              control the way you want it, instead of adding the RichTextBox and
              Button to the form, just add the UserControl you just created. This
              way everything is neatly self contained (encapsulated) and you don't
              need to worry about it in the form it will be added to. Any features
              that need to be exposed by the UserControl to the outside should be
              wrapped in a property (or by bubbling events if you need to expose an
              event), as it is generally a bad idea to expose an entire object.

              Any further questions please ask!

              Thanks,

              Seth Rowe


              Comment

              • Marc

                #8
                Re: How can i increase the mousehover event timer?

                On 2 Mar, 17:13, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                On Mar 2, 9:14 am, "Marc" <marc_cro...@ho tmail.comwrote:
                >
                >
                >
                >
                >
                On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
                >
                On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                >
                On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
                >
                On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                >
                On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
                >
                Hi,
                How can i increase the mousehover event timer?
                >
                AddHandler NewBtn.MouseHov er, AddressOf Shownotes
                Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
                System.EventArg s)
                MsgBox("ttt")
                >
                Thanks!!!
                >
                How about using MouseEnter / MouseLeave instead? If you need a timer,
                MouseEnter could start the timer and MouseLeave could stop it. Setting
                the timer's interval property will set the "hover" time to anything
                you want (as long as it's 1 millisecond or more).
                >
                However looking at your code, I wonder if using tooltips or even a
                helpprovider might be better. What exactly are you trying to
                accomplish?
                >
                Thanks,
                >
                Seth Rowe
                >
                Thanks Seth,
                >
                you are right...Tooltip s are much better for me.
                >
                Im just looking at them now. How do i specify which text to show on a
                button in code? i cant find any tooltop options i.e
                newbutton.toolt iptext?
                >
                The ToolTip component is what's called a provider component. It
                actually provides a new property to all the applicable control and the
                container (like your form) that you drop it on. With that said, after
                adding a TooTip component (called ToolTip1 by default) each control
                that can have a tooltip will then have a property called "ToolTip on
                ToolTip1" - this is where you should set the text for the tooltip.
                >
                Thanks,
                >
                Seth Rowe- Hide quoted text -
                >
                - Show quoted text -
                >
                OK thanks- Hide quoted text -
                >
                - Show quoted text -
                >
                HI,
                >
                I have a set of dynamically created buttons and textbox's. Each button
                is linked to a textbox using the accessiblename property. I want to
                show a button tool tip containing the text box's text. My code so far
                is below although i know this wont work!
                >
                any help is greatly appreciated.
                >
                Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
                System.Object, ByVal e As System.EventArg s) Handles
                AddNewDriverToo lStripMenuItem. Click
                >
                Dim NewBtn As New Button()
                NewBtn.Accessib leName = CStr(Now)
                Me.Controls.Add (NewBtn)
                >
                Dim NewTxt As New RichTextBox
                NewTxt.Accessib leName = NewBtn.Accessib leName
                Me.Controls.Add (NewTxt)
                >
                Dim ctlControl As Control
                Dim s As String
                For Each ctlControl In Me.Controls
                If TypeOf ctlControl Is RichTextBox And
                ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
                s = NewBtn.Text
                End If
                Next
                >
                ToolTip1.SetToo lTip(NewBtn, s)
                >
                Well, in your for each loop you are setting the string "s" to the
                value of the button's text, not the RichTextBox's text. Also, this
                loop is only run when the user clicks the
                AddNewDriverToo lStripMenuItem, meaning the tooltips won't be updated
                real time.
                >
                Also you may look at the tag property. With it you can actually set
                the value to an object (like say a certain RichTextBox) and then avoid
                having to do a for each loop to find a particular control. Besides, a
                person using a Accessibility settings will get upset with your
                AccessibleNames :-)
                >
                Instead, I would suggest you add a new usercontrol to your program. To
                this user control add a RichTextBox a Button, and a ToolTip - leave
                the default names for now. Next, add an event handler for the
                RichTextBox's TextChanged Event :
                >
                Private Sub RichTextBox1_Te xtChanged(ByVal sender As
                System.Object, ByVal e As System.EventArg s) Handles
                RichTextBox1.Te xtChanged
                ToolTip1.SetToo lTip(Me.Button1 , RichTextBox1.Te xt)
                End Sub
                >
                This will update the ToolTip for the button whenever the text changes
                in the RichTextBox. After you get everything laid out in the user
                control the way you want it, instead of adding the RichTextBox and
                Button to the form, just add the UserControl you just created. This
                way everything is neatly self contained (encapsulated) and you don't
                need to worry about it in the form it will be added to. Any features
                that need to be exposed by the UserControl to the outside should be
                wrapped in a property (or by bubbling events if you need to expose an
                event), as it is generally a bad idea to expose an entire object.
                >
                Any further questions please ask!
                >
                Thanks,
                >
                Seth Rowe- Hide quoted text -
                >
                - Show quoted text -
                Thank you very much!. extremely good advice.

                Comment

                • Marc

                  #9
                  Re: How can i increase the mousehover event timer?

                  On 2 Mar, 17:13, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                  On Mar 2, 9:14 am, "Marc" <marc_cro...@ho tmail.comwrote:
                  >
                  >
                  >
                  >
                  >
                  On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
                  >
                  On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                  >
                  On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
                  >
                  On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                  >
                  On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
                  >
                  Hi,
                  How can i increase the mousehover event timer?
                  >
                  AddHandler NewBtn.MouseHov er, AddressOf Shownotes
                  Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
                  System.EventArg s)
                  MsgBox("ttt")
                  >
                  Thanks!!!
                  >
                  How about using MouseEnter / MouseLeave instead? If you need a timer,
                  MouseEnter could start the timer and MouseLeave could stop it. Setting
                  the timer's interval property will set the "hover" time to anything
                  you want (as long as it's 1 millisecond or more).
                  >
                  However looking at your code, I wonder if using tooltips or even a
                  helpprovider might be better. What exactly are you trying to
                  accomplish?
                  >
                  Thanks,
                  >
                  Seth Rowe
                  >
                  Thanks Seth,
                  >
                  you are right...Tooltip s are much better for me.
                  >
                  Im just looking at them now. How do i specify which text to show on a
                  button in code? i cant find any tooltop options i.e
                  newbutton.toolt iptext?
                  >
                  The ToolTip component is what's called a provider component. It
                  actually provides a new property to all the applicable control and the
                  container (like your form) that you drop it on. With that said, after
                  adding a TooTip component (called ToolTip1 by default) each control
                  that can have a tooltip will then have a property called "ToolTip on
                  ToolTip1" - this is where you should set the text for the tooltip.
                  >
                  Thanks,
                  >
                  Seth Rowe- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  OK thanks- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  HI,
                  >
                  I have a set of dynamically created buttons and textbox's. Each button
                  is linked to a textbox using the accessiblename property. I want to
                  show a button tool tip containing the text box's text. My code so far
                  is below although i know this wont work!
                  >
                  any help is greatly appreciated.
                  >
                  Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
                  System.Object, ByVal e As System.EventArg s) Handles
                  AddNewDriverToo lStripMenuItem. Click
                  >
                  Dim NewBtn As New Button()
                  NewBtn.Accessib leName = CStr(Now)
                  Me.Controls.Add (NewBtn)
                  >
                  Dim NewTxt As New RichTextBox
                  NewTxt.Accessib leName = NewBtn.Accessib leName
                  Me.Controls.Add (NewTxt)
                  >
                  Dim ctlControl As Control
                  Dim s As String
                  For Each ctlControl In Me.Controls
                  If TypeOf ctlControl Is RichTextBox And
                  ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
                  s = NewBtn.Text
                  End If
                  Next
                  >
                  ToolTip1.SetToo lTip(NewBtn, s)
                  >
                  Well, in your for each loop you are setting the string "s" to the
                  value of the button's text, not the RichTextBox's text. Also, this
                  loop is only run when the user clicks the
                  AddNewDriverToo lStripMenuItem, meaning the tooltips won't be updated
                  real time.
                  >
                  Also you may look at the tag property. With it you can actually set
                  the value to an object (like say a certain RichTextBox) and then avoid
                  having to do a for each loop to find a particular control. Besides, a
                  person using a Accessibility settings will get upset with your
                  AccessibleNames :-)
                  >
                  Instead, I would suggest you add a new usercontrol to your program. To
                  this user control add a RichTextBox a Button, and a ToolTip - leave
                  the default names for now. Next, add an event handler for the
                  RichTextBox's TextChanged Event :
                  >
                  Private Sub RichTextBox1_Te xtChanged(ByVal sender As
                  System.Object, ByVal e As System.EventArg s) Handles
                  RichTextBox1.Te xtChanged
                  ToolTip1.SetToo lTip(Me.Button1 , RichTextBox1.Te xt)
                  End Sub
                  >
                  This will update the ToolTip for the button whenever the text changes
                  in the RichTextBox. After you get everything laid out in the user
                  control the way you want it, instead of adding the RichTextBox and
                  Button to the form, just add the UserControl you just created. This
                  way everything is neatly self contained (encapsulated) and you don't
                  need to worry about it in the form it will be added to. Any features
                  that need to be exposed by the UserControl to the outside should be
                  wrapped in a property (or by bubbling events if you need to expose an
                  event), as it is generally a bad idea to expose an entire object.
                  >
                  Any further questions please ask!
                  >
                  Thanks,
                  >
                  Seth Rowe- Hide quoted text -
                  >
                  - Show quoted text -
                  Seth,

                  quick question....if i use a Tag instead of accessiblename how can
                  search for a specific control without using loop?

                  Comment

                  • rowe_newsgroups

                    #10
                    Re: How can i increase the mousehover event timer?

                    On Mar 2, 12:37 pm, "Marc" <marc_cro...@ho tmail.comwrote:
                    On 2 Mar, 17:13, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                    >
                    >
                    >
                    On Mar 2, 9:14 am, "Marc" <marc_cro...@ho tmail.comwrote:
                    >
                    On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
                    >
                    On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                    >
                    On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
                    >
                    On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                    >
                    On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
                    >
                    Hi,
                    How can i increase the mousehover event timer?
                    >
                    AddHandler NewBtn.MouseHov er, AddressOf Shownotes
                    Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
                    System.EventArg s)
                    MsgBox("ttt")
                    >
                    Thanks!!!
                    >
                    How about using MouseEnter / MouseLeave instead? If you need a timer,
                    MouseEnter could start the timer and MouseLeave could stop it. Setting
                    the timer's interval property will set the "hover" time to anything
                    you want (as long as it's 1 millisecond or more).
                    >
                    However looking at your code, I wonder if using tooltips or even a
                    helpprovider might be better. What exactly are you trying to
                    accomplish?
                    >
                    Thanks,
                    >
                    Seth Rowe
                    >
                    Thanks Seth,
                    >
                    you are right...Tooltip s are much better for me.
                    >
                    Im just looking at them now. How do i specify which text to show on a
                    button in code? i cant find any tooltop options i.e
                    newbutton.toolt iptext?
                    >
                    The ToolTip component is what's called a provider component. It
                    actually provides a new property to all the applicable control and the
                    container (like your form) that you drop it on. With that said, after
                    adding a TooTip component (called ToolTip1 by default) each control
                    that can have a tooltip will then have a property called "ToolTip on
                    ToolTip1" - this is where you should set the text for the tooltip.
                    >
                    Thanks,
                    >
                    Seth Rowe- Hide quoted text -
                    >
                    - Show quoted text -
                    >
                    OK thanks- Hide quoted text -
                    >
                    - Show quoted text -
                    >
                    HI,
                    >
                    I have a set of dynamically created buttons and textbox's. Each button
                    is linked to a textbox using the accessiblename property. I want to
                    show a button tool tip containing the text box's text. My code so far
                    is below although i know this wont work!
                    >
                    any help is greatly appreciated.
                    >
                    Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
                    System.Object, ByVal e As System.EventArg s) Handles
                    AddNewDriverToo lStripMenuItem. Click
                    >
                    Dim NewBtn As New Button()
                    NewBtn.Accessib leName = CStr(Now)
                    Me.Controls.Add (NewBtn)
                    >
                    Dim NewTxt As New RichTextBox
                    NewTxt.Accessib leName = NewBtn.Accessib leName
                    Me.Controls.Add (NewTxt)
                    >
                    Dim ctlControl As Control
                    Dim s As String
                    For Each ctlControl In Me.Controls
                    If TypeOf ctlControl Is RichTextBox And
                    ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
                    s = NewBtn.Text
                    End If
                    Next
                    >
                    ToolTip1.SetToo lTip(NewBtn, s)
                    >
                    Well, in your for each loop you are setting the string "s" to the
                    value of the button's text, not the RichTextBox's text. Also, this
                    loop is only run when the user clicks the
                    AddNewDriverToo lStripMenuItem, meaning the tooltips won't be updated
                    real time.
                    >
                    Also you may look at the tag property. With it you can actually set
                    the value to an object (like say a certain RichTextBox) and then avoid
                    having to do a for each loop to find a particular control. Besides, a
                    person using a Accessibility settings will get upset with your
                    AccessibleNames :-)
                    >
                    Instead, I would suggest you add a new usercontrol to your program. To
                    this user control add a RichTextBox a Button, and a ToolTip - leave
                    the default names for now. Next, add an event handler for the
                    RichTextBox's TextChanged Event :
                    >
                    Private Sub RichTextBox1_Te xtChanged(ByVal sender As
                    System.Object, ByVal e As System.EventArg s) Handles
                    RichTextBox1.Te xtChanged
                    ToolTip1.SetToo lTip(Me.Button1 , RichTextBox1.Te xt)
                    End Sub
                    >
                    This will update the ToolTip for the button whenever the text changes
                    in the RichTextBox. After you get everything laid out in the user
                    control the way you want it, instead of adding the RichTextBox and
                    Button to the form, just add the UserControl you just created. This
                    way everything is neatly self contained (encapsulated) and you don't
                    need to worry about it in the form it will be added to. Any features
                    that need to be exposed by the UserControl to the outside should be
                    wrapped in a property (or by bubbling events if you need to expose an
                    event), as it is generally a bad idea to expose an entire object.
                    >
                    Any further questions please ask!
                    >
                    Thanks,
                    >
                    Seth Rowe- Hide quoted text -
                    >
                    - Show quoted text -
                    >
                    Seth,
                    >
                    quick question....if i use a Tag instead of accessiblename how can
                    search for a specific control without using loop?
                    It depends - which control are you trying to find and why do you need
                    to find it?

                    Thanks,

                    Seth Rowe

                    Comment

                    • Marc

                      #11
                      Re: How can i increase the mousehover event timer?

                      On 2 Mar, 17:49, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                      On Mar 2, 12:37 pm, "Marc" <marc_cro...@ho tmail.comwrote:
                      >
                      >
                      >
                      >
                      >
                      On 2 Mar, 17:13, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                      >
                      On Mar 2, 9:14 am, "Marc" <marc_cro...@ho tmail.comwrote:
                      >
                      On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
                      >
                      On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                      >
                      On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
                      >
                      On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                      >
                      On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
                      >
                      Hi,
                      How can i increase the mousehover event timer?
                      >
                      AddHandler NewBtn.MouseHov er, AddressOf Shownotes
                      Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
                      System.EventArg s)
                      MsgBox("ttt")
                      >
                      Thanks!!!
                      >
                      How about using MouseEnter / MouseLeave instead? If you need a timer,
                      MouseEnter could start the timer and MouseLeave could stop it. Setting
                      the timer's interval property will set the "hover" time to anything
                      you want (as long as it's 1 millisecond or more).
                      >
                      However looking at your code, I wonder if using tooltips or even a
                      helpprovider might be better. What exactly are you trying to
                      accomplish?
                      >
                      Thanks,
                      >
                      Seth Rowe
                      >
                      Thanks Seth,
                      >
                      you are right...Tooltip s are much better for me.
                      >
                      Im just looking at them now. How do i specify which text to show on a
                      button in code? i cant find any tooltop options i.e
                      newbutton.toolt iptext?
                      >
                      The ToolTip component is what's called a provider component. It
                      actually provides a new property to all the applicable control and the
                      container (like your form) that you drop it on. With that said, after
                      adding a TooTip component (called ToolTip1 by default) each control
                      that can have a tooltip will then have a property called "ToolTip on
                      ToolTip1" - this is where you should set the text for the tooltip.
                      >
                      Thanks,
                      >
                      Seth Rowe- Hide quoted text -
                      >
                      - Show quoted text -
                      >
                      OK thanks- Hide quoted text -
                      >
                      - Show quoted text -
                      >
                      HI,
                      >
                      I have a set of dynamically created buttons and textbox's. Each button
                      is linked to a textbox using the accessiblename property. I want to
                      show a button tool tip containing the text box's text. My code so far
                      is below although i know this wont work!
                      >
                      any help is greatly appreciated.
                      >
                      Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
                      System.Object, ByVal e As System.EventArg s) Handles
                      AddNewDriverToo lStripMenuItem. Click
                      >
                      Dim NewBtn As New Button()
                      NewBtn.Accessib leName = CStr(Now)
                      Me.Controls.Add (NewBtn)
                      >
                      Dim NewTxt As New RichTextBox
                      NewTxt.Accessib leName = NewBtn.Accessib leName
                      Me.Controls.Add (NewTxt)
                      >
                      Dim ctlControl As Control
                      Dim s As String
                      For Each ctlControl In Me.Controls
                      If TypeOf ctlControl Is RichTextBox And
                      ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
                      s = NewBtn.Text
                      End If
                      Next
                      >
                      ToolTip1.SetToo lTip(NewBtn, s)
                      >
                      Well, in your for each loop you are setting the string "s" to the
                      value of the button's text, not the RichTextBox's text. Also, this
                      loop is only run when the user clicks the
                      AddNewDriverToo lStripMenuItem, meaning the tooltips won't be updated
                      real time.
                      >
                      Also you may look at the tag property. With it you can actually set
                      the value to an object (like say a certain RichTextBox) and then avoid
                      having to do a for each loop to find a particular control. Besides, a
                      person using a Accessibility settings will get upset with your
                      AccessibleNames :-)
                      >
                      Instead, I would suggest you add a new usercontrol to your program. To
                      this user control add a RichTextBox a Button, and a ToolTip - leave
                      the default names for now. Next, add an event handler for the
                      RichTextBox's TextChanged Event :
                      >
                      Private Sub RichTextBox1_Te xtChanged(ByVal sender As
                      System.Object, ByVal e As System.EventArg s) Handles
                      RichTextBox1.Te xtChanged
                      ToolTip1.SetToo lTip(Me.Button1 , RichTextBox1.Te xt)
                      End Sub
                      >
                      This will update the ToolTip for the button whenever the text changes
                      in the RichTextBox. After you get everything laid out in the user
                      control the way you want it, instead of adding the RichTextBox and
                      Button to the form, just add the UserControl you just created. This
                      way everything is neatly self contained (encapsulated) and you don't
                      need to worry about it in the form it will be added to. Any features
                      that need to be exposed by the UserControl to the outside should be
                      wrapped in a property (or by bubbling events if you need to expose an
                      event), as it is generally a bad idea to expose an entire object.
                      >
                      Any further questions please ask!
                      >
                      Thanks,
                      >
                      Seth Rowe- Hide quoted text -
                      >
                      - Show quoted text -
                      >
                      Seth,
                      >
                      quick question....if i use a Tag instead of accessiblename how can
                      search for a specific control without using loop?
                      >
                      It depends - which control are you trying to find and why do you need
                      to find it?
                      >
                      Thanks,
                      >
                      Seth Rowe- Hide quoted text -
                      >
                      - Show quoted text -
                      OK,

                      so my users can dynamically add buttons to a form...basicall y i am
                      trying to allow the users to save text notes to a button. So when the
                      user double clicks on a button a text box appears.
                      As multiple buttons can be added i need a way to tie each button to
                      its text box. When the user creates a button I also create a new text
                      box automatically. Before i was populating the accessible name
                      property with the creation date time to tie the two together.

                      So when a user double clicks the button i was searching through every
                      control that matches the accessible name to show the appropriate text
                      box....make sense?

                      Comment

                      • rowe_newsgroups

                        #12
                        Re: How can i increase the mousehover event timer?

                        On Mar 2, 12:56 pm, "Marc" <marc_cro...@ho tmail.comwrote:
                        On 2 Mar, 17:49, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                        >
                        >
                        >
                        On Mar 2, 12:37 pm, "Marc" <marc_cro...@ho tmail.comwrote:
                        >
                        On 2 Mar, 17:13, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                        >
                        On Mar 2, 9:14 am, "Marc" <marc_cro...@ho tmail.comwrote:
                        >
                        On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
                        >
                        On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                        >
                        On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
                        >
                        On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                        >
                        On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
                        >
                        Hi,
                        How can i increase the mousehover event timer?
                        >
                        AddHandler NewBtn.MouseHov er, AddressOf Shownotes
                        Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
                        System.EventArg s)
                        MsgBox("ttt")
                        >
                        Thanks!!!
                        >
                        How about using MouseEnter / MouseLeave instead? If you need a timer,
                        MouseEnter could start the timer and MouseLeave could stop it. Setting
                        the timer's interval property will set the "hover" time to anything
                        you want (as long as it's 1 millisecond or more).
                        >
                        However looking at your code, I wonder if using tooltips or even a
                        helpprovider might be better. What exactly are you trying to
                        accomplish?
                        >
                        Thanks,
                        >
                        Seth Rowe
                        >
                        Thanks Seth,
                        >
                        you are right...Tooltip s are much better for me.
                        >
                        Im just looking at them now. How do i specify which text to show on a
                        button in code? i cant find any tooltop options i.e
                        newbutton.toolt iptext?
                        >
                        The ToolTip component is what's called a provider component. It
                        actually provides a new property to all the applicable control and the
                        container (like your form) that you drop it on. With that said, after
                        adding a TooTip component (called ToolTip1 by default) each control
                        that can have a tooltip will then have a property called "ToolTip on
                        ToolTip1" - this is where you should set the text for the tooltip.
                        >
                        Thanks,
                        >
                        Seth Rowe- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        OK thanks- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        HI,
                        >
                        I have a set of dynamically created buttons and textbox's. Each button
                        is linked to a textbox using the accessiblename property. I want to
                        show a button tool tip containing the text box's text. My code so far
                        is below although i know this wont work!
                        >
                        any help is greatly appreciated.
                        >
                        Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
                        System.Object, ByVal e As System.EventArg s) Handles
                        AddNewDriverToo lStripMenuItem. Click
                        >
                        Dim NewBtn As New Button()
                        NewBtn.Accessib leName = CStr(Now)
                        Me.Controls.Add (NewBtn)
                        >
                        Dim NewTxt As New RichTextBox
                        NewTxt.Accessib leName = NewBtn.Accessib leName
                        Me.Controls.Add (NewTxt)
                        >
                        Dim ctlControl As Control
                        Dim s As String
                        For Each ctlControl In Me.Controls
                        If TypeOf ctlControl Is RichTextBox And
                        ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
                        s = NewBtn.Text
                        End If
                        Next
                        >
                        ToolTip1.SetToo lTip(NewBtn, s)
                        >
                        Well, in your for each loop you are setting the string "s" to the
                        value of the button's text, not the RichTextBox's text. Also, this
                        loop is only run when the user clicks the
                        AddNewDriverToo lStripMenuItem, meaning the tooltips won't be updated
                        real time.
                        >
                        Also you may look at the tag property. With it you can actually set
                        the value to an object (like say a certain RichTextBox) and then avoid
                        having to do a for each loop to find a particular control. Besides, a
                        person using a Accessibility settings will get upset with your
                        AccessibleNames :-)
                        >
                        Instead, I would suggest you add a new usercontrol to your program. To
                        this user control add a RichTextBox a Button, and a ToolTip - leave
                        the default names for now. Next, add an event handler for the
                        RichTextBox's TextChanged Event :
                        >
                        Private Sub RichTextBox1_Te xtChanged(ByVal sender As
                        System.Object, ByVal e As System.EventArg s) Handles
                        RichTextBox1.Te xtChanged
                        ToolTip1.SetToo lTip(Me.Button1 , RichTextBox1.Te xt)
                        End Sub
                        >
                        This will update the ToolTip for the button whenever the text changes
                        in the RichTextBox. After you get everything laid out in the user
                        control the way you want it, instead of adding the RichTextBox and
                        Button to the form, just add the UserControl you just created. This
                        way everything is neatly self contained (encapsulated) and you don't
                        need to worry about it in the form it will be added to. Any features
                        that need to be exposed by the UserControl to the outside should be
                        wrapped in a property (or by bubbling events if you need to expose an
                        event), as it is generally a bad idea to expose an entire object.
                        >
                        Any further questions please ask!
                        >
                        Thanks,
                        >
                        Seth Rowe- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        Seth,
                        >
                        quick question....if i use a Tag instead of accessiblename how can
                        search for a specific control without using loop?
                        >
                        It depends - which control are you trying to find and why do you need
                        to find it?
                        >
                        Thanks,
                        >
                        Seth Rowe- Hide quoted text -
                        >
                        - Show quoted text -
                        >
                        OK,
                        >
                        so my users can dynamically add buttons to a form...basicall y i am
                        trying to allow the users to save text notes to a button. So when the
                        user double clicks on a button a text box appears.
                        As multiple buttons can be added i need a way to tie each button to
                        its text box. When the user creates a button I also create a new text
                        box automatically. Before i was populating the accessible name
                        property with the creation date time to tie the two together.
                        >
                        So when a user double clicks the button i was searching through every
                        control that matches the accessible name to show the appropriate text
                        box....make sense?
                        Ok, store the richtextbox you want to access in the Tag property of
                        it's associated button.

                        Even better you should use my suggestion of putting the button and
                        textbox into a user control and adding the user control at runtime
                        instead of the button and textbox. That way the usercontrol manages
                        it's controls (the textbox and button) while the form only has to
                        worry about adding the usercontrols. Is there something you don't
                        understand about this approach?

                        Thanks,

                        Seth Rowe

                        Comment

                        • Marc

                          #13
                          Re: How can i increase the mousehover event timer?

                          On 2 Mar, 18:18, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                          On Mar 2, 12:56 pm, "Marc" <marc_cro...@ho tmail.comwrote:
                          >
                          >
                          >
                          >
                          >
                          On 2 Mar, 17:49, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                          >
                          On Mar 2, 12:37 pm, "Marc" <marc_cro...@ho tmail.comwrote:
                          >
                          On 2 Mar, 17:13, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                          >
                          On Mar 2, 9:14 am, "Marc" <marc_cro...@ho tmail.comwrote:
                          >
                          On 2 Mar, 12:30, "Marc" <marc_cro...@ho tmail.comwrote:
                          >
                          On 2 Mar, 12:27, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                          >
                          On Mar 2, 7:04 am, "Marc" <marc_cro...@ho tmail.comwrote:
                          >
                          On 2 Mar, 11:52, "rowe_newsgroup s" <rowe_em...@yah oo.comwrote:
                          >
                          On Mar 2, 6:16 am, "Marc" <marc_cro...@ho tmail.comwrote:
                          >
                          Hi,
                          How can i increase the mousehover event timer?
                          >
                          AddHandler NewBtn.MouseHov er, AddressOf Shownotes
                          Private Sub Shownotes(ByVal sender As System.Object, ByVal e As
                          System.EventArg s)
                          MsgBox("ttt")
                          >
                          Thanks!!!
                          >
                          How about using MouseEnter / MouseLeave instead? If you need a timer,
                          MouseEnter could start the timer and MouseLeave could stop it. Setting
                          the timer's interval property will set the "hover" time to anything
                          you want (as long as it's 1 millisecond or more).
                          >
                          However looking at your code, I wonder if using tooltips or even a
                          helpprovider might be better. What exactly are you trying to
                          accomplish?
                          >
                          Thanks,
                          >
                          Seth Rowe
                          >
                          Thanks Seth,
                          >
                          you are right...Tooltip s are much better for me.
                          >
                          Im just looking at them now. How do i specify which text to show on a
                          button in code? i cant find any tooltop options i.e
                          newbutton.toolt iptext?
                          >
                          The ToolTip component is what's called a provider component. It
                          actually provides a new property to all the applicable control and the
                          container (like your form) that you drop it on. With that said, after
                          adding a TooTip component (called ToolTip1 by default) each control
                          that can have a tooltip will then have a property called "ToolTip on
                          ToolTip1" - this is where you should set the text for the tooltip.
                          >
                          Thanks,
                          >
                          Seth Rowe- Hide quoted text -
                          >
                          - Show quoted text -
                          >
                          OK thanks- Hide quoted text -
                          >
                          - Show quoted text -
                          >
                          HI,
                          >
                          I have a set of dynamically created buttons and textbox's. Each button
                          is linked to a textbox using the accessiblename property. I want to
                          show a button tool tip containing the text box's text. My code so far
                          is below although i know this wont work!
                          >
                          any help is greatly appreciated.
                          >
                          Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
                          System.Object, ByVal e As System.EventArg s) Handles
                          AddNewDriverToo lStripMenuItem. Click
                          >
                          Dim NewBtn As New Button()
                          NewBtn.Accessib leName = CStr(Now)
                          Me.Controls.Add (NewBtn)
                          >
                          Dim NewTxt As New RichTextBox
                          NewTxt.Accessib leName = NewBtn.Accessib leName
                          Me.Controls.Add (NewTxt)
                          >
                          Dim ctlControl As Control
                          Dim s As String
                          For Each ctlControl In Me.Controls
                          If TypeOf ctlControl Is RichTextBox And
                          ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
                          s = NewBtn.Text
                          End If
                          Next
                          >
                          ToolTip1.SetToo lTip(NewBtn, s)
                          >
                          Well, in your for each loop you are setting the string "s" to the
                          value of the button's text, not the RichTextBox's text. Also, this
                          loop is only run when the user clicks the
                          AddNewDriverToo lStripMenuItem, meaning the tooltips won't be updated
                          real time.
                          >
                          Also you may look at the tag property. With it you can actually set
                          the value to an object (like say a certain RichTextBox) and then avoid
                          having to do a for each loop to find a particular control. Besides, a
                          person using a Accessibility settings will get upset with your
                          AccessibleNames :-)
                          >
                          Instead, I would suggest you add a new usercontrol to your program. To
                          this user control add a RichTextBox a Button, and a ToolTip - leave
                          the default names for now. Next, add an event handler for the
                          RichTextBox's TextChanged Event :
                          >
                          Private Sub RichTextBox1_Te xtChanged(ByVal sender As
                          System.Object, ByVal e As System.EventArg s) Handles
                          RichTextBox1.Te xtChanged
                          ToolTip1.SetToo lTip(Me.Button1 , RichTextBox1.Te xt)
                          End Sub
                          >
                          This will update the ToolTip for the button whenever the text changes
                          in the RichTextBox. After you get everything laid out in the user
                          control the way you want it, instead of adding the RichTextBox and
                          Button to the form, just add the UserControl you just created. This
                          way everything is neatly self contained (encapsulated) and you don't
                          need to worry about it in the form it will be added to. Any features
                          that need to be exposed by the UserControl to the outside should be
                          wrapped in a property (or by bubbling events if you need to expose an
                          event), as it is generally a bad idea to expose an entire object.
                          >
                          Any further questions please ask!
                          >
                          Thanks,
                          >
                          Seth Rowe- Hide quoted text -
                          >
                          - Show quoted text -
                          >
                          Seth,
                          >
                          quick question....if i use a Tag instead of accessiblename how can
                          search for a specific control without using loop?
                          >
                          It depends - which control are you trying to find and why do you need
                          to find it?
                          >
                          Thanks,
                          >
                          Seth Rowe- Hide quoted text -
                          >
                          - Show quoted text -
                          >
                          OK,
                          >
                          so my users can dynamically add buttons to a form...basicall y i am
                          trying to allow the users to save text notes to a button. So when the
                          user double clicks on a button a text box appears.
                          As multiple buttons can be added i need a way to tie each button to
                          its text box. When the user creates a button I also create a new text
                          box automatically. Before i was populating the accessible name
                          property with the creation date time to tie the two together.
                          >
                          So when a user double clicks the button i was searching through every
                          control that matches the accessible name to show the appropriate text
                          box....make sense?
                          >
                          Ok, store the richtextbox you want to access in the Tag property of
                          it's associated button.
                          >
                          Even better you should use my suggestion of putting the button and
                          textbox into a user control and adding the user control at runtime
                          instead of the button and textbox. That way the usercontrol manages
                          it's controls (the textbox and button) while the form only has to
                          worry about adding the usercontrols. Is there something you don't
                          understand about this approach?
                          >
                          Thanks,
                          >
                          Seth Rowe- Hide quoted text -
                          >
                          - Show quoted text -
                          OK thanks very much for the help

                          Comment

                          Working...