我想要vb.net中的验证码 [英] I want validation codes in vb.net

查看:62
本文介绍了我想要vb.net中的验证码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想在vb.net中以登录表单的退出按钮提供验证码
我的意思是如果我想单击登录表单中的退出按钮-
它会显示amessege询问我是否要退出还是没有(yes,no)question

Hello,I want validation codes in vb.net for exit button in login form
I mean if i want to click exit button in login form -
it will show amessege ask me if i want to exit or no (yes,no)question

推荐答案

我会用它,因为它将以任何方式处理即使用户单击右上角的x,该窗体也已关闭.
I''d use this because it will take care of any way that the form is being closed, even if it''s the user clicking the x in the upper right corner.
Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
    If MessageBox.Show("Do you want to exit?", "Exit?", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.No Then
        'User decided not to exit, cancel the form close
        e.Cancel = True
    End If
End Sub


我们无法回答.

我们如何知道您要验证的内容?或哪些值对您的应用程序有效?

想想看:到目前为止,您出门兜风时已经崩溃了.您随机叫了一个车库,说:我的车坏了.修理它."然后放下电话.您是否认为等待机械师提供他需要的所有零件和工具会很久?
We cannot answer that.

How would we know what you are trying to validate? Or what values are valid for your application?

Think about it: So far you have broken down while out for a drive. You have called a garage at random and said "My Car broke. Fix it." then put the phone down. Do you think you will be waiting long for a mechanic to arrive with all the parts and tools he needs?


类似的东西?

something like this?

If MessageBox.Show("Do u want to exit?", "Exit the program", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
    Me.Close()
End If


这篇关于我想要vb.net中的验证码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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