Listview透明不支持winforms?请帮忙做到这一点 [英] Listview transparent is not supporting in winforms? Please help to do this

查看:55
本文介绍了Listview透明不支持winforms?请帮忙做到这一点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public Form1()
        {

            SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true);
            InitializeComponent();
          
            var pos = this.PointToScreen(listView1.Location);
            pos = pictureBox1.PointToClient(pos);
            listView1.Parent = pictureBox1;
            listView1.Location = pos;
            listView1.BackColor = Color.Transparent;

        }





我的尝试:





What I have tried:

public Form1()
        {

            SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true);
            InitializeComponent();
          
            var pos = this.PointToScreen(listView1.Location);
            pos = pictureBox1.PointToClient(pos);
            listView1.Parent = pictureBox1;
            listView1.Location = pos;
            listView1.BackColor = Color.Transparent;

        }

推荐答案

在CodeProject上询问并回答:



https://www.codeproject.com/Questions/195384/In-C-how-to-make-listview-background-Transparent
Asked and answered, right here on CodeProject:

https://www.codeproject.com/Questions/195384/In-C-how-to-make-listview-background-Transparent


这篇关于Listview透明不支持winforms?请帮忙做到这一点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆