MDI form background with screen scaling

xiaoxiao2021-03-06  38

Recently used this feature is wasted a lot of time. Finally, I found very simple:

Just add the following code in the onload event in the form

Private Void Mainform_Load (Object Sender, System.Eventargs E)

{

Image background = image.fromfile ("Image Path");

Image tmpback = new bitmap (background, this.width, this.height);

THIS.BACKGROUNDIMAGE = TMPBACK;

}

转载请注明原文地址:https://www.9cbs.com/read-66393.html

New Post(0)