题目可能说得不清楚,我要实现如下功能:在一个Userform中,显示某个目录下的所有图片(用Image控件),鼠标点击某个图片,可以获得该图片的文件名。我的做法是:
Dim theImageBox As Image
Set theImageBox = thePage.Controls.Add("Forms.Image.1", "image", True)
theImageBox.Move X, Y, picWidth, picHeight
theImageBox.Picture = LoadPicture(fullFileName)问题是我无法定义每个Image的鼠标点击事件。
请各位不吝赐教,我只要实现所述功能,不一定要用Image控件。
Dim theImageBox As Image
Set theImageBox = thePage.Controls.Add("Forms.Image.1", "image", True)
theImageBox.Move X, Y, picWidth, picHeight
theImageBox.Picture = LoadPicture(fullFileName)问题是我无法定义每个Image的鼠标点击事件。
请各位不吝赐教,我只要实现所述功能,不一定要用Image控件。
不知我理解的对不对,感谢指导
我要用下面一段代码,theImageBox是由Add方法返回的,不是我自己定义的。Dim theImageBox As Image
Set theImageBox = thePage.Controls.Add("Forms.Image.1", "image", True)
theImageBox.Move X, Y, picWidth, picHeight请高手说的详细一点点吧,我是菜鸟,谢谢帮忙啊!怎样定义theIamgeBox的click事件?
谢谢。