我从自己的库中剥离一段给你,可以实现这样的效果。
Option Compare Database
Private Sub frm_child_iamge_properties(ByVal imagename As String)
Dim CtlA As Access.Control
'循环处理活动窗体的所有控件
For Each CtlA In Me.Controls
If CtlA.ControlType = acImage Then '针对 图像 控件进行遍历设置
If CtlA.name = imagename Then
With CtlA
' .borderwith = 3
.BorderColor = 16744448
.BorderStyle = 1
End With
Else
With CtlA
' .borderwith = 1
.BorderColor = 0
.BorderStyle = 0
End With
End If
End If
Next CtlA
End Sub
Private Sub 图像12_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call frm_child_iamge_properties(Me.图像12.name)
End Sub
Private Sub 图像13_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call frm_child_iamge_properties(Me.图像13.name)
End Sub
[此贴子已经被作者于2006-6-29 18:11:35编辑过]
|