注销后恢复表单大小 [英] restore form size after log out

查看:52
本文介绍了注销后恢复表单大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有C#应用程序的问题,如果我从当前帐户切换或让pc直到帐户注销然后登录我发现表单大小更改,例如注销前的表单大小是{Width = 1024,Height = 768并且在{Width = 1024,Height = 690}之后没有任何代码执行类似的操作,我也尝试在Event FormPaint重置表单大小,但值仍为{Width = 1024,Height = 690}并且不会应用更改。

解决方案

如果要记住表单大小,程序退出时请尝试在应用程序设置中存储当前表单大小。然后,您可以在Form_Load事件中将表单的大小调整为最后已知的大小。


程序仍在运行,但是窗口的大小在widows待机后更改。这就是恢复表单大小的意思。


当计算机处于待机状态时,您的表单会改变大小吗?

我的不是吗?

I have problem with C# application, if I switch from current account or let pc until account log out and then log on I found that form size change, for example Form size before log out is {Width=1024, Height=768} and after is {Width=1024, Height=690} there is no any code do something like that, also I try to reset form size at Event FormPaint but value still {Width=1024, Height=690} and doesn''t apply change.

解决方案

If you want to remember the form size, when the program exits try storing the current form size in the Application settings. You can then resize the form to the last known size in the Form_Load event.


Program still running but the size of the form change after widows stand by. This is what I mean by restore form size.


Your forms change size when the computer is put in standby?
Mine don''t?


这篇关于注销后恢复表单大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆