[英]Change all forms sizes (Find & Replace)
I want to change the size of all forms in my desktop solution.我想在我的桌面解决方案中更改所有 forms 的大小。 I am sure I need to change in the designer file of every form a line like below:我确定我需要在每个表单的设计器文件中更改如下一行:
this.ClientSize = new System.Drawing.Size(932, 620);
to the one below到下面的那个
this.ClientSize = new System.Drawing.Size(1366, 768);
These forms currently have different sizes but I want all of them to have same size.这些 forms 目前有不同的尺寸,但我希望它们都具有相同的尺寸。 I tried a search replace but that doesnt work because the sizes for each from are different.我尝试了搜索替换,但这不起作用,因为每个 from 的大小不同。 I am think maybe if I search by regular expression it might work but have no clue about the regex needed to find all occurrences and replace them.我想也许如果我通过正则表达式搜索它可能会起作用,但不知道查找所有出现并替换它们所需的正则表达式。
I am using VS2019 and it's winforms.我正在使用 VS2019,它是 winforms。 Anyone please help.任何人请帮忙。
Make your Find/Replace window look like this:使您的查找/替换 window 看起来像这样:
\.ClientSize = new System\.Drawing\.Size\(\d+, \d+\)
查找: \.ClientSize = new System\.Drawing\.Size\(\d+, \d+\)
.ClientSize = new System.Drawing.Size(1366, 768)
回复: .ClientSize = new System.Drawing.Size(1366, 768)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.