16,555
社区成员
发帖
与我相关
我的任务
分享
Private Sub myControl_MouseClick(sender As Object, e As MouseEventArgs) Handles Me.MouseClick
Me.Focus()
End Sub
Private FocuMe As Boolean
Protected Overrides Sub OnGotFocus(e As EventArgs)
MyBase.OnGotFocus(e)
Refresh()
FocuMe = False
End Sub
Protected Overrides Sub OnLostFocus(e As EventArgs)
MyBase.OnLostFocus(e)
FocuMe = True
End Sub
.....
.....
Private Sub pich(ByVal a As Short, g As Graphics, TemInt As Integer)
g.FillPolygon(New SolidBrush(Color.Black), {New Point(8, a * 18 + 10), New Point(16, a * 18 + 14), New Point(8, a * 18 + 18)})
If FocuMe = True Then
g.FillRectangle(New SolidBrush(Color.FromArgb(&H71EB2000)), 0, a * 18 + TemInt, Me.Width, 18)
End If
If FocuMe = False Then
g.FillRectangle(New SolidBrush(Color.FromArgb(&H71AA0000)), 0, a * 18 + TemInt, Me.Width, 18)
End If
End Sub