The Click Twice Control BUG

A

Alberto Cardoso

Hi!

Ive been looking for a solution for this for a while with no success.
Create a form with a listview, fill the listview and show an messagebox on
the screen.
When you close the messagebox you need to click TWICE on the form. Only the
second click takes action... I found this is a bug:

http://support.microsoft.com/default.aspx?scid=kb;en-us;215390

Any one with a solution/suggestion?

Thanks!
 
A

Arun

Set the TabIndex of the Listview control to 0, then the focus on the
form will be always be on the listview and there is no need of a
second click.
Hope this helps,

Cheers,
Arun
 
A

Alberto Cardoso

Hi Arun.

Thanks for the reply. But Im afraid that did not work here. Did you manage
to test there?

What happens is in that the SelectedIndexChanged sometimes has to show a
MessageBox, and after it shows 2 clicks are needed to select another Item in
the listview.

Any other suggestions?

Thanks!
 
A

Arun

I did tried before replying, can you please post some repro code?

--------------------------------------------------------------------------------------------------------
I tried like this
private void listView1_SelectedIndexChanged(object sender,
EventArgs e)
{

MessageBox.Show(listView1.SelectedIndices.Count.ToString());
}

This always returns me 1 when I click an item in lisview, and when I
click out side of the items, it returns 0,
nevertheless i click only once on the item or on listview and not
twice.
---------------------------------------------------------------------------------------------------------------------
 

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