Click here to Skip to main content
15,917,793 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# SendMessage in C++ Pin
Christian Graus17-May-08 18:09
protectorChristian Graus17-May-08 18:09 
GeneralRe: C# SendMessage in C++ Pin
luisgrimaldo17-May-08 18:19
luisgrimaldo17-May-08 18:19 
GeneralRe: C# SendMessage in C++ Pin
Christian Graus17-May-08 18:35
protectorChristian Graus17-May-08 18:35 
Questionfile download c# asp.net Pin
irusul17-May-08 13:09
irusul17-May-08 13:09 
AnswerRe: file download c# asp.net Pin
Christian Graus17-May-08 13:25
protectorChristian Graus17-May-08 13:25 
Questionset cursor position on control in active form Pin
baranils17-May-08 11:00
baranils17-May-08 11:00 
AnswerRe: set cursor position on control in active form Pin
William Ten Broek17-May-08 11:38
William Ten Broek17-May-08 11:38 
GeneralRe: set cursor position on control in active form Pin
baranils17-May-08 12:06
baranils17-May-08 12:06 
Thank you

But this is not the solution

First I'm trying to set cursor on a DGV (as explained), not a textbox
Two : the problem was to set the cursor position to that control

Here is the working code :
First : I compute the point P to get to position relative to the form
Second : I translate this point to Screen coordinate relative to the form position using PointToScreen


private void HandMade_Click(object sender, EventArgs e)
{
dgv_X.Focus();
int X = dgv_X.Left + dgv_X.Width / 4;
int Y = dgv_X.Top + dgv_X.Height / 2;
Point P = new Point(X, Y);
Cursor.Position = this.PointToScreen(P);
}
QuestionProgrmming with USB in C# (Need a book) Pin
hdv21217-May-08 10:50
hdv21217-May-08 10:50 
AnswerRe: Progrmming with USB in C# (Need a book) Pin
Christian Graus17-May-08 12:52
protectorChristian Graus17-May-08 12:52 
AnswerRe: Progrmming with USB in C# (Need a book) Pin
Giorgi Dalakishvili17-May-08 22:36
mentorGiorgi Dalakishvili17-May-08 22:36 
QuestionReportViewer Speed Pin
Amir Jalaly17-May-08 9:24
Amir Jalaly17-May-08 9:24 
QuestionTextRenderer.DrawText with TextFormatFlags.ModifyString Pin
Lea Hayes17-May-08 8:09
Lea Hayes17-May-08 8:09 
AnswerRe: TextRenderer.DrawText with TextFormatFlags.ModifyString Pin
Guffa17-May-08 11:37
Guffa17-May-08 11:37 
GeneralRe: TextRenderer.DrawText with TextFormatFlags.ModifyString Pin
Lea Hayes17-May-08 12:34
Lea Hayes17-May-08 12:34 
QuestionC# WebBrowser Pin
Member 428380717-May-08 7:32
Member 428380717-May-08 7:32 
AnswerRe: C# WebBrowser Pin
Ravi Bhavnani17-May-08 8:02
professionalRavi Bhavnani17-May-08 8:02 
QuestionHow connect forms with lines? Pin
Noemi Katinka17-May-08 6:43
Noemi Katinka17-May-08 6:43 
AnswerRe: How connect forms with lines? Pin
Anthony Mushrow17-May-08 6:53
professionalAnthony Mushrow17-May-08 6:53 
AnswerRe: How connect forms with lines? Pin
Thomas Stockwell18-May-08 3:56
professionalThomas Stockwell18-May-08 3:56 
Question[Message Deleted] Pin
pinna_hari17-May-08 4:55
pinna_hari17-May-08 4:55 
AnswerRe: String Problem [modified] Pin
PIEBALDconsult17-May-08 5:01
mvePIEBALDconsult17-May-08 5:01 
GeneralRe: String Problem Pin
pinna_hari18-May-08 23:15
pinna_hari18-May-08 23:15 
GeneralRe: String Problem Pin
DaveyM6918-May-08 23:33
professionalDaveyM6918-May-08 23:33 
AnswerRe: String Problem Pin
KennyPatel17-May-08 5:12
KennyPatel17-May-08 5:12 

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.