Componentresourcemanager applyresources更改表单大小

编程入门 行业动态 更新时间:2024-10-22 20:22:06
本文介绍了Componentresourcemanager applyresources更改表单大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我从另一个代码编写器继承了一个项目。在项目中这段代码:

Dim culture_info As 新 System.Globalization.CultureInfo(locale_name) Dim manager As New ComponentResourceManager(form_cur。 GetType ) manager.ApplyResources(form_cur, $ this,culture_info)

导致调整大小的主窗体(变小)。 我知道这与表单的原始大小有关。但是,当我在派生的新项目上实现此方法时,主窗体不会改变大小。 我尝试过: 在新项目中,我尝试调整表单大小并关闭项目。假设新的大小将通过Me.Settings调用保存。 但是在重新启动新项目时,表单的大小仍保持编程状态。 有人可以解释原始项目中发生的事情吗?谢谢。

解决方案

这个,culture_info)

导致调整大小的主窗体(变小)。 我知道这与表单的原始大小有关。但是当我实现这个时派生新项目的方法,主要形式不会改变大小。 我尝试过: 在新项目中,我尝试调整表单大小并关闭项目。假设新的大小将通过Me.Settings调用保存。 但是在重新启动新项目时,表单的大小仍保持编程状态。 有人可以解释原始项目中发生了什么吗?谢谢。

I have inherited a project from another code writer. In the project this code:

Dim culture_info As New System.Globalization.CultureInfo(locale_name) Dim manager As New ComponentResourceManager(form_cur.GetType) manager.ApplyResources(form_cur, "$this", culture_info)

Leads to the main form being resized (becomes smaller). I understand that this has something to do with the original size of the form. However when I implement this method on a derived new project, the main form does not change size. What I have tried: In the new project, I have tried resizing the form and closing the project. Assuming that the new size would be saved through the Me.Settings call. However on restarting the new project the form's size remains as programmed. Can someone explain what is happening in the original project? Thanks.

解决方案

this", culture_info)

Leads to the main form being resized (becomes smaller). I understand that this has something to do with the original size of the form. However when I implement this method on a derived new project, the main form does not change size. What I have tried: In the new project, I have tried resizing the form and closing the project. Assuming that the new size would be saved through the Me.Settings call. However on restarting the new project the form's size remains as programmed. Can someone explain what is happening in the original project? Thanks.

更多推荐

Componentresourcemanager applyresources更改表单大小

本文发布于:2023-11-11 18:09:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   大小   Componentresourcemanager   applyresources

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!