Linux 拨号vps windows公众号手机端

vb如何把label设置为透明

lewis 8年前 (2017-07-16) 阅读数 7 #程序编程
文章标签 vb

在VB中,可以通过设置Label控件的BackColor属性为Transparent来使Label透明。

例如,以下代码将Label1设置为透明:

Label1.BackColor = Color.Transparent

此外,还可以使用以下代码将整个窗体的所有Label控件都设置为透明:

For Each ctrl As Control In Me.Controls
    If TypeOf ctrl Is Label Then
        ctrl.BackColor = Color.Transparent
    End If
Next
版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门