Click here to Skip to main content
15,899,126 members
Home / Discussions / C#
   

C#

 
GeneralRe: MP3 Duration Pin
Heath Stewart16-Sep-04 9:32
protectorHeath Stewart16-Sep-04 9:32 
GeneralDTS Programming Pin
stan2816-Sep-04 8:57
stan2816-Sep-04 8:57 
GeneralRe: DTS Programming Pin
Daniel Turini16-Sep-04 12:02
Daniel Turini16-Sep-04 12:02 
GeneralRe: DTS Programming Pin
stan2817-Sep-04 2:59
stan2817-Sep-04 2:59 
GeneralRe: DTS Programming Pin
stan2817-Sep-04 13:34
stan2817-Sep-04 13:34 
GeneralRe: DTS Programming Pin
stan288-Oct-04 2:40
stan288-Oct-04 2:40 
GeneralWhich Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Khang Nguyen16-Sep-04 6:17
Khang Nguyen16-Sep-04 6:17 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Heath Stewart16-Sep-04 7:05
protectorHeath Stewart16-Sep-04 7:05 
DataGrid.HitTest does work, but when not clicking you need to convert the mouse coordinates from screen coordinates to client coordinates. When you click the mouse, the control's event already translates the coordinates for you.

It's quite simple:
Point p = MousePosition;
p = dataGrid1.PointToClient(p);
HitTestInfo info = dataGrid1.HitTest(p);
When you respond to mouse clicks, do not translate the coordinates, remember, since they are already translated to client coordinates (client being the control) for you.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles]
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Khang Nguyen16-Sep-04 8:16
Khang Nguyen16-Sep-04 8:16 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Heath Stewart16-Sep-04 9:18
protectorHeath Stewart16-Sep-04 9:18 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Khang Nguyen16-Sep-04 12:23
Khang Nguyen16-Sep-04 12:23 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Heath Stewart16-Sep-04 13:15
protectorHeath Stewart16-Sep-04 13:15 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Khang Nguyen16-Sep-04 13:26
Khang Nguyen16-Sep-04 13:26 
GeneralRe: Error with file I/O in C# Pin
Grimolfr16-Sep-04 6:27
Grimolfr16-Sep-04 6:27 
GeneralSave project Pin
ee9903516-Sep-04 4:15
ee9903516-Sep-04 4:15 
GeneralRe: Save project Pin
sreejith ss nair16-Sep-04 17:29
sreejith ss nair16-Sep-04 17:29 
GeneralRe: Save project Pin
ee9903517-Sep-04 0:05
ee9903517-Sep-04 0:05 
GeneralReflection problem Pin
Ananth RK16-Sep-04 3:47
Ananth RK16-Sep-04 3:47 
GeneralRe: Reflection problem Pin
leppie16-Sep-04 3:53
leppie16-Sep-04 3:53 
GeneralRe: Reflection problem Pin
Ananth RK16-Sep-04 4:24
Ananth RK16-Sep-04 4:24 
GeneralRe: Reflection problem Pin
Heath Stewart16-Sep-04 6:34
protectorHeath Stewart16-Sep-04 6:34 
GeneralRe: Reflection problem Pin
Ananth RK16-Sep-04 8:05
Ananth RK16-Sep-04 8:05 
GeneralRe: Reflection problem Pin
Heath Stewart16-Sep-04 9:24
protectorHeath Stewart16-Sep-04 9:24 
Generalabout xml: Pin
skywen16-Sep-04 3:41
skywen16-Sep-04 3:41 
GeneralRe: about xml: Pin
Heath Stewart16-Sep-04 6:26
protectorHeath Stewart16-Sep-04 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.