ACCESS 修改按钮上的图片

需求:

我有个按钮,设置了lock图标,想在点击它的时候,图标在lock与unlock之前切换

 实现代码:

Private Sub Command297_Click()
    If Command297.Tag = -1 Then ' change to unlock
        Command297.Picture = "unlock"
        Command297.Tag = 0
    Else                        'change to lock
        Command297.Tag = -1
        Command297.Picture = "lock"
    End If
End Sub        

效果:

 

posted @ 2024-05-13 18:12  一曲轻扬  阅读(27)  评论(0编辑  收藏  举报