Button Click & Listview events not triggered

V

vsciw

Hi.

We have a smart device app written in VB.NET, CF2.0 which has a form
with listview & buttons. On this particuar form, sometimes when you
click the listview or the buttons, the Listview.SelectedIndexChanged &
Button.Click events are only triggered the second time you click them.
Sometimes it's the first time. We want it triggered on the first
click.

We've tried the listview.activation property set to standard, oneclick
& twoclick. no effect.

Cant see anything else on the button, listview or form properties
which may relate to this.

Also, this is only happening on one form, and not others in the same
app.

Does anyone have any suggestions of what may be the cause??

Thanks. Ian.
 
V

vsciw

Hi.

We have a smart device app written in VB.NET, CF2.0 which has a form
with listview & buttons. On this particuar form, sometimes when you
click the listview or the buttons, the Listview.SelectedIndexChanged &
Button.Click events are only triggered the second time you click them.
Sometimes it's the first time. We want it triggered on the first
click.

We've tried the listview.activation property set to standard, oneclick
& twoclick. no effect.

Cant see anything else on the button, listview or form properties
which may relate to this.

Also, this is only happening on one form, and not others in the same
app.

Does anyone have any suggestions of what may be the cause??

Thanks. Ian.

I thought it may be focus related so have tried setting focus to the
form, button & listview, but there's no difference. After selecting a
listview item or clicking the button, i'm displaying a messagebox, so
i tried setting the focus after the messagebox is cleared.

Ian.
 
G

Guest

Are you showing your form with ShowDialog or Show. The issue could be that
the form does not have focus and on the first click, the form gets focus and
then the click event occurs on the second event. Try using ShowDialog and
see if you experience the same results.

Regard,
Rick D.
Contractor
 
V

vsciw

Are you showing your form with ShowDialog or Show. The issue could be that
the form does not have focus and on the first click, the form gets focus and
then the click event occurs on the second event. Try using ShowDialog and
see if you experience the same results.

Regard,
Rick D.
Contractor







- Show quoted text -

Thanks, but we are using ShowDialog.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top