datagridview能否设置背景图,或者让它透明化?

作业本_ 2013-07-25 05:48:27
一个dataGridView的歌曲列表,想让它有一图景图,或者让它透明化也行,求大手指点.

谢谢...
...全文
664 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
作业本_ 2013-08-08
  • 打赏
  • 举报
回复
应该只能用listView来代替,dataView实现不了。
paopaozhu8899 2013-07-25
  • 打赏
  • 举报
回复
public class myDataGridView : System.Windows.Forms.DataGridView { public Image BackgroundImage { get { return backgroundImage; } set { backgroundImage = value; if ( value != null ) this.SetStyle( ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint , true ); } } protected override void PaintBackground( Graphics graphics , Rectangle clipBounds , Rectangle gridBounds ) { base.PaintBackground( graphics , clipBounds , gridBounds ); if ( this.backgroundImage != null ) { graphics.DrawImage( this.backgroundImage , gridBounds ); } } }
作业本_ 2013-07-25
  • 打赏
  • 举报
回复
能看到图片就OK.

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧