Newbe:登录用户名和密码 [英] Newbe: login username and passwords

查看:96
本文介绍了Newbe:登录用户名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个登录表单,我在

代码中设置了用户名和密码。我想知道如何设置一个变量以便我可以有一个表格

返回并查看用户在登录表单上的文本框中输入的内容。

解决方案

嗨Wes,

这是在网页表格还是窗体上?

Cor


您好,您可以创建一个模块,并在其中放置一个公共变量:


公共模块

Public g_strUser As String

Public g_strPass As String

结束模块


当在登录表单上单击确定按钮时,将用户名存储在

g_strUser和g_strPass中的密码...现在你可以从任何地方访问那些

变量。


-

HTH,

- Tom Spink,überGeek


请回复新闻组,

so所有人都可以受益


" System.Reflection Master"


====转换为2002 ====

删除内联声明

" Wes McCaslin <无*********** @ olp.net>在留言中写道

news:ep ************** @ TK2MSFTNGP11.phx.gbl ...

我创建了一个登录表单,我在代码中设置用户名和密码
。我想知道如何设置一个变量,以便我可以有一个
的形式返回并查看用户在登录
表格的文本框中输入的内容。



" Tom Spink" <第********** @ ntlworld.com> scripsit:

您好,您可以创建一个模块,并在其中放置一个公共变量:

公共模块
Public g_strUser As String
Public g_strPass As字符串
结束模块

当在登录表单上单击确定按钮时,将用户名存储在
g_strUser中,密码存储在g_strPass中...现在你可以从任何地方访问这些变量。




我更喜欢属性...


-

Herfried K. Wagner

MVP·VB Classic,VB.NET

< http://www.mvps.org/dotnet>


I have created a login form where i set the username and password within the
code. I was wondering how could I set a varible so that I could have a form
go back and look at what the user typed in the textboxes on the login form.

解决方案

Hi Wes,
Is this on a webform or a windowform?
Cor


Hi, you can create a module, and place a public variable inside:

Public Module
Public g_strUser As String
Public g_strPass As String
End Module

When the ''OK'' button is clicked on the login form, store the username in
g_strUser and the password in g_strPass... Now you can access those
variables from anywhere.

--
HTH,
-- Tom Spink, über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
"Wes McCaslin" <no***********@olp.net> wrote in message
news:ep**************@TK2MSFTNGP11.phx.gbl...

I have created a login form where i set the username and password within the code. I was wondering how could I set a varible so that I could have a form go back and look at what the user typed in the textboxes on the login form.



"Tom Spink" <th**********@ntlworld.com> scripsit:

Hi, you can create a module, and place a public variable inside:

Public Module
Public g_strUser As String
Public g_strPass As String
End Module

When the ''OK'' button is clicked on the login form, store the username in
g_strUser and the password in g_strPass... Now you can access those
variables from anywhere.



I prefer properties...

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


这篇关于Newbe:登录用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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