lbl<名称>
再加一个Timer控件,名字也要符合命名规范
在窗体代码对话框中打入
Private Sub Form_Load()
On Error Resume Next
Me.Font = "Arial"
Me.FontSize = 24
Me.FontBold = True
<Timer控件名>.Enabled = True
<Timer控件名>.Interval = 1000
End Sub
'下列函数只能二选其一
'是时间显示
Private Sub <Timer控件名>_Timer()
On Error Resume Next
<Label控件名>.Caption = Time
End Sub
'是日期与时间显示
Private Sub <Timer控件名>_Timer()
On Error Resume Next
<Label控件名>.Caption = Now
End Sub
Dimconn
As
OleDbConnection
Dim
da
As
OleDbDataAdapter
Dim
ds
As
New
DataSet
Dim
ds1
As
New
DataSet
Dim
dt
As
DataTable
Dim
str
As
String
'Dim
cmd
As
OleDbCommand
'Dim
rd
As
OleDbDataReader
conn
=
New
OleDbConnection
conn.ConnectionString
=
"Provider=Microsoft.Jet.OleDb.4.0Data
Source=d:\\第一步\\user.mdb"
conn.Open()
str
=
"select
*
from
reg
where
userid='"
&
yonghu.Text
&
"'
"
'cmd
=
New
OleDbCommand(str,
conn)
'rd
=
cmd.ExecuteReader()
'If
rd.Read()
Then
'
End
If
da
=
New
OleDbDataAdapter(str,
conn)
da.Fill(ds)
'Dim
i
As
Integer
'i
=
ds.Tables(0).Rows.Count
'MsgBox(i)
If
ds.Tables(0).Rows.Count
=
0
Then
MsgBox("你还没有注册,请先注册会员")
Else
Dim
str2
As
String
str2
=
"select
*
from
reg
where
userid='"
&
yonghu.Text
&
"'
and
password='"
&
password.Text
&
"'"
da
=
New
OleDbDataAdapter(str2,
conn)
da.Fill(ds1)
If
ds1.Tables(0).Rows.Count
=
0
Then
MsgBox("密码错误")
Else
'window.top.document.location.href
=
"../huiyuah.aspx"
Session.Add("yonghuming",
yonghu.Text)
Response.Redirect("huiyuan.aspx")
End
If
End
If
conn.Close()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)