我在我的项目C#winform中设置了背景图像,但是将Form属性设置为
RightToLeft=Yes and RightToLeftLayout=True
Run Code Online (Sandbox Code Playgroud)
然后消失我的背景图像.
有人帮我吗?
小智 5
You can paint the image manually, by overriding the OnPaintBackground
method of your form:
protected override void OnPaintBackground(PaintEventArgs e)
{
e.Graphics.DrawImage(Properties.Resources.SampleImage,
new Rectangle(Point.Empty, this.ClientSize));
}
Run Code Online (Sandbox Code Playgroud)