From: Peter on
Hi,
I have a label on a form and am using the label.click event to do
a very simply task such as adding an item to a list box.
If I rapidly click the label, I can only update the list box about
every 300mS, ie clicking the lable updates the list box but then there
is a delay before it is or can be updated again.
If I add a command button and make the command button call the
label.click event, the updating is virtually instantaneous, ie there
is no discernable delay between clicking the command button and the
list box being updated.
Can anyone offer a suggestion how I might be able to make the response
of clicking on the label as quick as clicking on the command button,
please.
Thanks,
Peter
From: Auric__ on
On Thu, 18 Mar 2010 12:47:38 GMT, Peter wrote:

> I have a label on a form and am using the label.click event to do
> a very simply task such as adding an item to a list box.
> If I rapidly click the label, I can only update the list box about
> every 300mS, ie clicking the lable updates the list box but then there
> is a delay before it is or can be updated again.
> If I add a command button and make the command button call the
> label.click event, the updating is virtually instantaneous, ie there
> is no discernable delay between clicking the command button and the
> list box being updated.
> Can anyone offer a suggestion how I might be able to make the response
> of clicking on the label as quick as clicking on the command button,
> please.

Why is it so important that the list update in less time than 3/10 of a
second? Do your users really sit there and just jam on that label repeatedly?

--
- And knowing is half the battle!
- Then what's the other half?
From: Peter on
On Mar 18, 1:36 pm, "Auric__" <not.my.r...(a)email.address> wrote:
> On Thu, 18 Mar 2010 12:47:38 GMT, Peter wrote:
> > I have a label on a form and am using the   label.click    event to do
> > a very simply task such as adding an item to a list box.
> > If I rapidly click the label, I can only update the list box about
> > every 300mS, ie clicking the lable updates the list box but then there
> > is a delay before it is or can be updated again.
> > If I add a command button and make the command button call the
> > label.click event, the updating is virtually instantaneous, ie there
> > is no discernable delay between clicking the command button and the
> > list box being updated.
> > Can anyone offer a suggestion how I might be able to make the response
> > of clicking on the label as quick as clicking on the command button,
> > please.
>
> Why is it so important that the list update in less time than 3/10 of a
> second? Do your users really sit there and just jam on that label repeatedly?
>
It is not important at all - I am simply giving this as an example of
what is happening.
In the final application, rapid clicking of a label will be redrawing
circles on the form and sending data via the serial port and this
300mS delay is then critical.
However, all this is not really relevant to the basic problem which
causes a 300mS delay to occur when I simply use the label.click event
to update a list box and to which I am trying to find a way of
avoiding.
Thanks,
Peter


From: Mike Williams on
On 18 Mar, 12:47, Peter <peterleslier...(a)googlemail.com> wrote:

> I have a label on a form and am using the label.click
> event to do a very simply task such as adding an item
> to a list box. If I rapidly click the label, I can
> only update the list box about every 300mS, ie click
> the lable updates the list box but then there is a
> delay before it is or can be updated again. If I add
> a command button and make the command button call the
> label.click event, it is virtually instantaneous

A Label has a DblClick event whereas a CommandButton does not, so the
Label is seeing lots of your rapid clicks as a double click instead of
an ordinary click, and the Click event is therefore not dealing with
them. For the Label you can make it work the way you want by calling
your code from both its Click evnt and its DblClick event.

Mike

From: Peter on
On Mar 18, 4:04 pm, Mike Williams <gagam...(a)yahoo.co.uk> wrote:
> On 18 Mar, 12:47, Peter <peterleslier...(a)googlemail.com> wrote:
>
> > I have a label on a form and am using the label.click
> > event to do a very simply task such as adding an item
> > to a list box. If I rapidly click the label, I can
> > only update the list box about every 300mS, ie click
> > the lable updates the list box but then there is a
> > delay before it is or can be updated again. If I add
> > a command button and make the command button call the
> > label.click event, it is virtually instantaneous
>
> A Label has a DblClick event whereas a CommandButton does not, so the
> Label is seeing lots of your rapid clicks as a double click instead of
> an ordinary click, and the Click event is therefore not dealing with
> them. For the Label you can make it work the way you want by calling
> your code from both its Click evnt and its DblClick event.
>
> Mike

Hi Mike,
Brilliant! Obvious now I stop and think about it but I'm sure it would
have taken me forever to figure it out!
VERY many thanks for your help.
Peter