I have created one User Control which contains Combo and Listview such that When User Click on Combo's dropdown arrow it shows list view. For that i use Dropdown event of combo. when user click on other part except arrow, it hides listview if listview is open. it works fine on XP and Vista .. but cannot work on Windows 7.
In Windows 7 when the drop down event called , it also calls click event..So list view never seen. while it is not happening in XP and Vista.
then i try to change the Event instead of using click to hide listview, i use Dropdown close of combo.. it solves the problem on Windows 7. but creates same problem in XP and Vista.

try abcPosted Dec 30, 2009, 2:59 AM
What i did is :
IN LOAD
"HIDE LIST VIEW"
IN DROP DOWN
"SHOW LIST VIEW"
IN CLICK
IF( LIST VIEW OPEN) "HIDE LIST VIEW"
i just mean When I use Combo's Dropdown and click events ON XP it works Fine.
BUT on WINSOWS 7 Click is automatically called when Dropdown event Fires.
So listview Never shows...
SO that I changes the code as Below,
IN LOAD
"HIDE LIST VIEW"
IN DROP DOWN
"SHOW LIST VIEW"
IN DROPDOWN_CLOSED
IF( LIST VIEW OPEN) "HIDE LIST VIEW"
it Works fine on Windows 7 & but Not on XP....
ON XP , WHEN DropDOWN event fires, DROPDOWN_Closed also call. So listview not displyed.
In short, for me, DROPDOWN_Closed Work on Win 7 and Not ON XP
and CLICK works on XP and not on Win 7..
How to solve ths issue.. as my applciation is used on Diffrent OS.
Kirtan PatelPosted Dec 29, 2009, 6:55 AM
Its Works Fine With Windows 7 too ,
I have Coded it like below and it works
private void comboBox1_DropDown(object sender, EventArgs e)
{
listView1.Visible = true;
}
private void comboBox1_DropDownClosed(object sender, EventArgs e)
{
listView1.Visible = false;
}
private void UserControl1_Load(object sender, EventArgs e)
{
listView1.Visible = false;
}
it mt answer helps you then please check "Do you like this answer" check box :)