Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i make a windowapplication which is on datagrideview and picturebox which is connect with sql connection plz tell me how to select a cell in datagrideview on mouseover means(without clicking on cell) in short i just select a cell in datagrideview on just mouseover on cell plz help me plz
Posted
Comments
Sergey Alexandrovich Kryukov 30-Nov-12 17:44pm    
"DataGridView" and "PictureBox" (why?!) mean "System.Windows.Forms"; this is not the only "Window Application" library. Please tag: "Forms".
Why selecting on mouse over, ever? This is not an accepted UI style.
--SA
Arbaz Ali 30-Nov-12 23:20pm    
no u dont understand what i say forget picture box... sir u just tell me when we click on datagridview cell cell is selected i just want this process without click ....... in short when we take cursor on datagrideview cell cell is selected.........
Sergey Alexandrovich Kryukov 30-Nov-12 23:35pm    
PictureBox is just the indication that you use Forms. What do you think I did not understand? I answered in full on control events, check it out, properly.
— SA

1 solution

Please see my comment. Selecting anything in a control on mouse click is expected behavior, on mouse order is not. Don't do it. However, if you really want to scare off your users with inconvenient freaking UI action, use these two events:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseenter.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseleave.aspx[^].

Or, to make it even worse, handle this one http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mousehover.aspx[^].

But much better, don't do anything like that.

Good luck, stay out of trouble.
—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900