VB中button控件的属性captionPointedColor,在VB.NET中对应的button控件属性是什么?
captionPointedColor就是当鼠标移动到button上的时候,button中显示文字的颜色的变化。...
captionPointedColor就是当鼠标移动到button上的时候,button中显示文字的颜色的变化。
展开
2个回答
展开全部
哥们captionPointedColor,VB标准BUTTON控件没这个属性吧。至于.NET改变文字稍微麻烦点, 你可以使用MouseHover和MouseLeave事件设置BUTTON,ForeColor从而改变文字颜色。假如要改变背景颜色就简单了,将FlatStyle属性设置为Flat,然后修改FlatAppearance下的子集就可以了 。
加个代码:
Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseHover
Button1.ForeColor = Color.Azure
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ForeColor = Color.Black
End Sub
加个代码:
Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseHover
Button1.ForeColor = Color.Azure
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ForeColor = Color.Black
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询