txt.Location.X.tostring();
txt.Location.X.tostring();
txt.Location.X.tostring();
解决方案 »
- 大家帮忙啊!
- 问一个关于SOCKET的问题
- 关于combobox绑定的问题
- 使用C#的SerialPort类,碰到的问题。
- EXT checkbox C#后台如何绑定状态
- 新手问题C#中MDI的问题
- 怎么把Panel的边框变成虚线呢?
- CSDN的计分系统是不是有问题?大家碰到过吗?
- 假设listView里是空数据,想按一个"新建"按钮,就可以编辑listView,listView 可以自动增加一行,该怎么写代码呢?想把comboBox控件加在listVi
- 各位新年快乐 , 在这里请教大家一个问题
- 我想用C#封装C写的API,里面一大堆void*, dword, LPCTSTR,请问分别用什么代替。
- 怎样结束一个进程?
control.Location.X.tostring();
可以用MousePosition得到屏幕坐标,但怎样将这个坐标转换成控件坐标呢???
或者根据屏幕坐标来设置控件的位置???
private void TotalDataGrid_CurrentCellChanged(object sender, System.EventArgs e)
{
Rectangle r=TotalDataGrid.GetCurrentCellBounds();
cbAll.Left=r.Left;
cbAll.Top=r.Top;
cbAll.Width=r.Width;
cbAll.Height=r.Height; cbAll.Show();
}//cbAll是一个列表筐,怎么样?不用找坐标了吧 :)