The Click Twice Control BUG

  • Thread starter Thread starter Alberto Cardoso
  • Start date Start date
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!
 
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
 
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!
 
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.
---------------------------------------------------------------------------------------------------------------------
 
Back
Top