如何在VB中打开一个新表单但关闭旧表单 [英] How to open a new form but closing the old one in VB

查看:28
本文介绍了如何在VB中打开一个新表单但关闭旧表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我欢迎使用我的应用程序,因为它正在加载,但随后需要在点击继续按钮时关闭该表单并打开登录表单.

I have a welcome to my application as it loads up, but then need to have that form close and login form open when the continue button is hit.

我的代码:

    Me.Close()
    Dim Login As New Form
    Login.Show()

当我单击按钮时,它只会关闭欢迎表单,然后结束应用程序.如果能帮忙谢谢!:)

When I click the button it only closes the welcome form and then ends the application. If you can help thanks! :)

推荐答案

可以设置项目的属性,在关闭模式下拉菜单中选择When last form closes"

You can set the properties of the project to select "When last form closes" in the shutdown mode dropdown

更新:-

项目"菜单 -> 'YourApp' 属性... -> 应用程序选项卡

查找:关机模式"

更改自

当启动表单关闭时"-->当最后一个表单关闭时"

这篇关于如何在VB中打开一个新表单但关闭旧表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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