c# - Cursor position inside WinForms -


i try set cursor in specific location inside form, ok when form maximized when size of form changed cursor position outside of form

sorry english.

private void button1_click(object sender, eventargs e) {     int xp = 585;     int yp = 330;     cursor.position = pointtoclient(new point(xp, yp));     point mousep = pointtoclient(cursor.position);     tbx1.text = mousep.x.tostring();     tby1.text = mousep.y.tostring(); } 

provided variables xp , yp offset inside window...

cursor.position = new point(location.x + xp, location.y + yp); 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -