如何在Windows窗体应用程序上保持视图 [英] how to maitain views on windows form application

查看:100
本文介绍了如何在Windows窗体应用程序上保持视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个Windows窗体计算器,我不知道如何去处理这个属性。

能够以最后选择的视图启动或打开 - 标准,科学,基本等。

或者,Windows窗体应用程序打开的能力最小化,因为它最后关闭最小化并打开最大化,因为它最后关闭最大化。

请帮忙。

谢谢!

I am designing a windows form calculator and I don't know how to go about this property.
The ability to start or open with the last choosen view - standard, scientific, basic, etc.
Or still, the ability of a windows form application to open minimized because it was lastly closed minimized and to open maximized because it was lastly closed maximized.
Please help.
Thank you!

推荐答案

您可以在表单关闭时保存这些设置,然后在应用程序启动时再次加载。请查看以下链接以获取更多信息

如何在WinForms应用程序设置中记录窗口位置 [ ^ ]
you can save these settings on form closing and load then again when your application start. check below link for more information
How to record window position in WinForms application settings[^]


CodeProject有几篇文章将教您如何使用用户设置。在我看来,使用用户设置对于像你这样需要保存少量设置的情况是一个很好的策略,然后在应用程序打开以配置应用程序时使用。



这篇文章是一个很好的实用介绍,可以立即开始:[ ^ ]。



本文为您提供了对用户的良好概述和理解各种.NET平台上的设置,包括Win Forms,WPF等:[ ^ ]。



本文提供了一个可重用的组件,可用于持久化应用程序设置; imho,当你有许多设置需要保存/恢复时,它可能很有用:[ ^ ]。
CodeProject has several articles that will teach you how to use User Settings. In my opinion using User Settings is a good strategy for cases like yours where a small number of settings need to be saved, and then used when the Application opens to configure the Application.

This article is a good practical introduction that will get you started right away: [^].

This article gives you a good overview and understanding of User Settings across various .NET platforms including Win Forms, WPF, etc. : [^].

This article provides a reusable component that you can use for persisting application settings; imho, it may be useful when you have many settings to save/restore: [^].


这篇关于如何在Windows窗体应用程序上保持视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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