将详细信息携带到另一种形式 [英] carrying details to another form

查看:55
本文介绍了将详细信息携带到另一种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在制作电影院座位预订表,并且有一个登录屏幕,当您成功登录时,它会带您选择连接到数据库的座位

hi i'm making a cinema seat booking form and i have a login screen which when you succesfully log in it takes you to pick yours seats which are connected to a database

基本上,我需要该程序才能获取"程序.人员的用户名,然后在下一种形式中需要说您以"..."登录.

请提供任何帮助?

basicly what i need is for the program to "get" the persons username and then in the next form it needs to say you are logged in as"....".

any help please?

推荐答案

"get"形式在哪里?用户名来自?很容易将其传递到下一个表单.

Where does form "get" the username from? It's easy to pass it to the next form.

Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Form2.Show()
    End Sub

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
    End Sub

    Private Sub Login_Click(sender As Object, e As EventArgs) Handles Login.Click
        Form2.Label1.Text = "You are logged in as " & TextBox1.Text
    End Sub

End Class


Public Class Form2

    Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

    End Sub

End Class



这篇关于将详细信息携带到另一种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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