Tab Control - First Event...Again

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?cmFuZHkxMjAw?=

    #1

    Tab Control - First Event...Again

    I have a tab control which has several tab pages.

    At run-time, switching between the tab pages can take as long as a few
    seconds.

    Any suggestions on what I can get to fire at the instant the user clicks on
    the TabControl? All the event handlers I've tried so far (Click, MouseClick,
    SelectedIndexCh anged) only fire after the tab page actually changes.

    In case it's not obvious, the user are okay with waiting a few seconds if
    they have a visual indication something is happening (like a progress bar).
    The users are not okay with just waiting to see if something eventually
    happens.

    Again, the question is about what event can I use immediately after the
    mouse click on the tab control. Redesigning an application done by someone
    who's long gone is not an option right now, and posting rhetorical questions
    instead of answering the question asked is not helpful.

    Thanks,
    Randy

  • Chris Shepherd

    #2
    Re: Tab Control - First Event...Again

    randy1200 wrote:
    I have a tab control which has several tab pages.
    >
    At run-time, switching between the tab pages can take as long as a few
    seconds.
    This should only be true the first time, unless there's some kind of
    processing that happens *every* time a tab gets focus.

    Controls on TabPages don't actually exist until they would be shown the
    first time, and the construction of these controls may explain the long
    loading time. Without knowing specifically whether it is every time you
    switch or just the first time, it's hard to rule out possible causes.
    Any suggestions on what I can get to fire at the instant the user clicks on
    the TabControl? All the event handlers I've tried so far (Click, MouseClick,
    SelectedIndexCh anged) only fire after the tab page actually changes.
    In case it's not obvious, the user are okay with waiting a few seconds if
    they have a visual indication something is happening (like a progress bar).
    The users are not okay with just waiting to see if something eventually
    happens.
    >
    Again, the question is about what event can I use immediately after the
    mouse click on the tab control. Redesigning an application done by someone
    who's long gone is not an option right now, and posting rhetorical questions
    instead of answering the question asked is not helpful.
    Have you run through the debugger to determine exactly what it is doing
    on the change of the tabpage that is taking so long?


    Chris.

    Comment

    • Ignacio Machin \( .NET/ C# MVP \)

      #3
      Re: Tab Control - First Event...Again

      Hi,

      What do the tabpages contains that it takes that long to display?

      Are you doing any processing in the tabindex_change event?




      --
      Ignacio Machin
      The #1 Warehouse Management System & Direct Store Delivery Software (DSD) for QuickBooks & ERP Systems – LaceUp Solutions

      Mobile & warehouse Solutions.
      "randy1200" <randy1200@disc ussions.microso ft.comwrote in message
      news:CE8F36C6-8C02-43AC-B31C-043CA2CF51FC@mi crosoft.com...
      >I have a tab control which has several tab pages.
      >
      At run-time, switching between the tab pages can take as long as a few
      seconds.
      >
      Any suggestions on what I can get to fire at the instant the user clicks
      on
      the TabControl? All the event handlers I've tried so far (Click,
      MouseClick,
      SelectedIndexCh anged) only fire after the tab page actually changes.
      >
      In case it's not obvious, the user are okay with waiting a few seconds if
      they have a visual indication something is happening (like a progress
      bar).
      The users are not okay with just waiting to see if something eventually
      happens.
      >
      Again, the question is about what event can I use immediately after the
      mouse click on the tab control. Redesigning an application done by someone
      who's long gone is not an option right now, and posting rhetorical
      questions
      instead of answering the question asked is not helpful.
      >
      Thanks,
      Randy
      >

      Comment

      • Peter Duniho

        #4
        Re: Tab Control - First Event...Again

        On Mon, 31 Dec 2007 05:18:00 -0800, randy1200
        <randy1200@disc ussions.microso ft.comwrote:
        [...]
        Any suggestions on what I can get to fire at the instant the user clicks
        on
        the TabControl? All the event handlers I've tried so far (Click,
        MouseClick,
        SelectedIndexCh anged) only fire after the tab page actually changes.
        >
        In case it's not obvious, the user are okay with waiting a few seconds if
        they have a visual indication something is happening (like a progress
        bar).
        The users are not okay with just waiting to see if something eventually
        happens.
        Why are you starting a new thread? Why not just update the previous
        thread you had, answering the questions I asked when I replied to that
        one? My questions weren't rhetorical in my previous reply, they aren't
        here, and if you insist on treating them as they are, you're never going
        to get answers that will help you.

        You'll notice that you elicited two more replies, both of which are very
        much in the same vein as my original reply that you've ignored.

        Until you explain _why_ your tab control takes so long to switch tabs,
        it's not possible to discuss possible solutions. While I already provided
        one suggestion for how you might intercept the user's action earlier, I
        doubt that's really the right solution. You should be focusing more on
        the performance and responsiveness side of things than on getting the user
        input at a specific time.

        In any case, you would do well to be less dismissive of those who try to
        help you. That sort of thing is a great way to get people to just not
        care at all about whether you ever get an answer.

        Pete

        Comment

        • Chris Shepherd

          #5
          Re: Tab Control - First Event...Again

          Peter Duniho wrote:
          Why are you starting a new thread? Why not just update the previous
          thread you had, answering the questions I asked when I replied to that
          one? My questions weren't rhetorical in my previous reply, they aren't
          here, and if you insist on treating them as they are, you're never going
          to get answers that will help you.
          You'll notice that you elicited two more replies, both of which are very
          much in the same vein as my original reply that you've ignored.

          Yeah, I noticed that this was a duplicate thread after I'd already
          responded (I have my news reader sort newest posts first), else I would
          have mentioned this in my reply and instead replied to the original thread.

          When posters do this sort of thing, it makes me at least not want to
          reply (when I catch it), because it tells me that even if I give them
          useful advice they likely aren't going to read it anyways.

          Chris.

          Comment

          • =?Utf-8?B?cmFuZHkxMjAw?=

            #6
            RE: Tab Control - First Event...Again

            Many thanks for the replies. The answer from Chris made it pretty easy to
            figure out where to look for and find the problem.

            I found an OnSelectedItemC hanging() in a base class that was in turn
            publishing to subscribers that access the database. In essence, changing the
            tab was calling the database.

            I don't know what other people are using, but I'm accessing this through the
            MSDN web page. The post I made last week got one response, and I know this
            because I always click the "Notify me of replies" button. When I simply
            scrolled down through the posts this morning, my post from last week is not
            in the list. I just looked again to see if maybe I was being careless, but I
            still don't see my post from last week by simply scrolling. I included
            "...Again" to emphasize I'm not just shotgunning with the posts.

            I think some of Pete's comments got off the subject. Rather than dwell on
            that, I'll ask what people are using for newsgroup readers that include a
            "Notify me of replies" button.

            Randy

            Comment

            • Chris Shepherd

              #7
              Re: Tab Control - First Event...Again

              randy1200 wrote:
              I don't know what other people are using, but I'm accessing this through the
              MSDN web page. The post I made last week got one response, and I know this
              because I always click the "Notify me of replies" button. When I simply
              scrolled down through the posts this morning, my post from last week is not
              in the list. I just looked again to see if maybe I was being careless, but I
              still don't see my post from last week by simply scrolling. I included
              "...Again" to emphasize I'm not just shotgunning with the posts.
              Just because you only get one response doesn't mean you should repost a
              new thread. Pete asked you pretty well what I did (for more detail), and
              again, all that's proving is that you would ignore people trying to help
              you because you don't think they're asking the right things to help you.

              If it was some random poster's name you'd never seen before, maybe I
              could understand that. Pete is quite a prolific poster here and is
              always good about providing quality advice and responses.
              I think some of Pete's comments got off the subject. Rather than dwell on
              that, I'll ask what people are using for newsgroup readers that include a
              "Notify me of replies" button.
              I am using Thunderbird and just have it set to automatically watch
              threads to which I have replied (via a message filter), so I get a small
              eye icon next to those threads.

              Chris.

              Comment

              Working...