我正在处理一个Windows窗体应用程序,其中我需要将背景图像设置为数据网格视图的数据行。例如,如果我的数据网格中有4行,我希望将图像重复到行背景,而不是整个网格视图。图像应设置为背景图像,以便我可以在图像上的文本。我怎样才能做到这一点呢?请帮帮忙。提前谢谢。
发布于 2013-12-29 22:15:18
你可以这样做:
Image img;
public Form1()
{
InitializeComponent();
img = Image.FromFile(@"C:\Pictures\1.jpg");
}
private void GV_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawImageUnscaled(img, new Point(0, 0));
}https://stackoverflow.com/questions/20825867
复制相似问题