我使用以下代码将项目添加到列表框中:
SELECT d1.dptLib AS "Department Name",
d2.dptLib AS "Administrative Dept."
FROM dpt d1
LEFT JOIN dpt d2
on d2.dptNo = d1.dptAdm
当我鼠标悬停时,我想放大列表框中的图像。
如何访问列表框的项目(图像)?
答案 0 :(得分:0)
你可以这样做,
private void myListBox_MouseHover(object sender, EventArgs e){
Point point = myListBox.PointToClient(Cursor.Position);
int index = myListBox.IndexFromPoint(point); //this wil give index
}