小编Dew*_*ewi的帖子

将单选按钮中包含的小圆圈(点)的颜色更改为红色?

如何在Winform Application中使用VB.NET或C#将单选按钮中包含的小圆圈(点)的颜色更改为红色?

关心和谢谢,Dewi

================================================== ========
我会分享,可能对别人有用.这个程序有效.

Imports System.Drawing.Drawing2D

Public Class Form1

Public Class MyRadioButton
    Inherits RadioButton

    Private m_OnColor As Color
    Private m_OffColor As Color

    Public Sub New(ByVal On_Color As Color, ByVal Off_Color As Color)
        m_OnColor = On_Color
        m_OffColor = Off_Color
        SetStyle(ControlStyles.SupportsTransparentBackColor, True)
        BackColor = Color.Transparent
    End Sub

    Public Property OnColor() As Color
        Get
            Return m_OnColor
        End Get
        Set(ByVal value As Color)
            m_OnColor = value
        End Set
    End Property

    Public Property OffColor() As Color
        Get
            Return m_OffColor
        End Get
        Set(ByVal value …
Run Code Online (Sandbox Code Playgroud)

c# vb.net radio-button winforms

7
推荐指数
2
解决办法
2万
查看次数

标签 统计

c# ×1

radio-button ×1

vb.net ×1

winforms ×1