473,394 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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,
SelectedIndexChanged) 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

Dec 31 '07 #1
6 1666
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,
SelectedIndexChanged) 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.
Dec 31 '07 #2
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
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"randy1200" <ra*******@discussions.microsoft.comwrote in message
news:CE**********************************@microsof t.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,
SelectedIndexChanged) 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

Dec 31 '07 #3
On Mon, 31 Dec 2007 05:18:00 -0800, randy1200
<ra*******@discussions.microsoft.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,
SelectedIndexChanged) 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
Dec 31 '07 #4
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.
Dec 31 '07 #5
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 OnSelectedItemChanging() 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
Dec 31 '07 #6
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.
Jan 2 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lyn | last post by:
Hi, I have a text control on a form which is bound to table field StartDate which is in Date format. When updating the table record via the form, any data entered into the StartDate control is...
2
by: MLH | last post by:
A form named frmVehicleEntryForm has a number of textbox controls who's OnGotFocus property setting is an expression... =Change2Green() Change2Green() looks something like this... Dim MyControl...
4
by: Iain Porter | last post by:
Hi all, I have a usercontrol (a textbox with dropdown calendar that fills the textbox with the selected date) that I implement in a datagrid in a webform. On first loading the page, the datagrid's...
1
by: Earl Teigrob | last post by:
PROBLEM: When a user control is loaded into a PlaceHolder control more than once, the events do not fire on the first click of a control on the dynamically loaded user control. In other words, the...
6
by: Angel | last post by:
I have a button, combo, and custom control that i created. When I click the button i want to set certain display properties of my custom control depending whats in the combo. I set those properties...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
11
by: Hoku | last post by:
I am using dual monitors on a dual head ATI AGP4x video card. I installed the Nov 11 2005 release of ATI's catalyst control center with Hydravision to manage the dual monitor setup. I recently...
5
by: Mike TI | last post by:
March 24, 2006 Hi all I am new to VB.NET and am using VB.NET 2005. I have an MDI form with a Split Container Control. On demand I am adding and removing User Controls on Panel 2. I am using...
1
by: jelle.huygen | last post by:
Hello, I have a problem in ASP.NET 2.0 with the viewstate of my dynamically added user control. I have reproduced the problem with a very simple user control and a very simple page. On my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.