使用复选框将启动form1更改为form2 [英] Change startup form1 to form2 with checkbox

查看:105
本文介绍了使用复选框将启动form1更改为form2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i have 3 forms .form 1 run as startup and also there is a checkbox  i want to set startup for form 2 or 3 instead of form1 when checkbox is checked and when it’s uncheck back to form1 as  startup  in c#

What I have tried:

<pre> i have no idea how it set  i try a lot no one succeed

推荐答案

在FormClosing事件中保存您的复选框状态(请参阅设置.settings文件在你的项目属性下)。

在program.cs文件中,你会找到打开第一个表单的代码。

检查保存的复选框状态,在那里打开适当的表格。
Save your checkbox status in the FormClosing event (see the settings.settings file under your project properties).
In you program.cs file, you will find the code for opening the first form.
Check the saved checkbox state, and open the appropriate form there.


这篇关于使用复选框将启动form1更改为form2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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