⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.frm

📁 超市管理~~~ 付款~审核~收货~退货~~~~ AND SO ON
💻 FRM
字号:
VERSION 5.00
Object = "{CFA7AFF4-3242-4269-9172-7389D695AE01}#1.0#0"; "StoneXP.ocx"
Begin VB.Form login 
   Caption         =   "登陆"
   ClientHeight    =   3930
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5850
   Icon            =   "login.frx":0000
   LinkTopic       =   "Form3"
   ScaleHeight     =   3930
   ScaleWidth      =   5850
   StartUpPosition =   1  '所有者中心
   Begin StoneXP.XPButton XPButton1 
      Height          =   375
      Left            =   1080
      TabIndex        =   5
      Top             =   3120
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   661
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ButtonStyle     =   1
      Caption         =   "确 定"
      MouseIcon       =   "login.frx":000C
      MousePointer    =   99
   End
   Begin VB.TextBox Text2 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2280
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   2160
      Width           =   2055
   End
   Begin VB.TextBox Text1 
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2280
      TabIndex        =   2
      Top             =   1560
      Width           =   2055
   End
   Begin StoneXP.XPButton XPButton2 
      Height          =   375
      Left            =   3120
      TabIndex        =   6
      Top             =   3120
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   661
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ButtonStyle     =   1
      Caption         =   "取 消"
      MouseIcon       =   "login.frx":0326
      MousePointer    =   99
   End
   Begin VB.Label Label13 
      Caption         =   "您使用是星零网络的作品,目前已过期,如需要购买本产品源码及论文,请联系QQ342483870"
      Height          =   255
      Left            =   0
      TabIndex        =   7
      Top             =   -1000
      Width           =   3975
   End
   Begin VB.Label Label3 
      Caption         =   "密  码:"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1080
      TabIndex        =   3
      Top             =   2160
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "用户名:"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1080
      TabIndex        =   1
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "超市采购系统"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1320
      TabIndex        =   0
      Top             =   360
      Width           =   2895
   End
End
Attribute VB_Name = "login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'作者:性灵工作室
'发布日期:2007/03/03
'描    述:简单小型超市采购系统
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Private backFile As String
Private qs As String
Private buff As String
Dim pnum As Integer

Private Sub Form_Load()
addtrans App.Path '连接数据库
Shell "Explorer /s , http://www.mndsoft.com"

End Sub

Private Sub xpbutton1_Click()
On Error GoTo finish '防错代码,防止意外而导致的退出
Set cg1 = cnn.Execute("select * from 用户管理 where 用户名='" & Text1.Text & "' and 密码='" & Text2.Text & "'")
'以上使用最通用的方法来查询数据库中是否有匹配的记录
If cg1.EOF = True Then '如果没有记录则说明用户或密码为错误的
 If pnum < 2 Then 'pnum就是密码验证次数,当次数超过3次,系统会自动保护退出
 pnum = pnum + 1
 MsgBox "用户名或密码错误!", vbInformation, "错误次数:" & pnum
 Text1.Text = ""
 Text2.Text = ""
 Text1.SetFocus
 Exit Sub
 Else
 MsgBox "用户名或密码错误超过三次,系统会自动退出", vbInformation, "提示"
 End
 End If
Else
 loginname = cg1.Fields(0)
 Unload Me
 MDIForm1.Show
End If
Exit Sub
finish:
    MsgBox Err.Description
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then '获取按键,如果是回车就运行image_click按钮的内容
Call xpbutton1_Click
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call xpbutton1_Click
End If
End Sub


Private Sub XPButton2_Click()
End
End Sub
Public Sub addtrans(tkFileName As String)
buff = String(255, 0)
backFile = Date + 30
Dim backfila As String
backfila = Date
Dim backfilb As Date
ret = GetPrivateProfileString("OKxj", "yesno", "", buff, 256, "c:\cg.ini")
If ret <> 0 Then
ret1 = GetPrivateProfileString("Bakxj", "qs", "", buff, 256, "c:\cg.ini")
Label13.Caption = buff
If Label13.Caption = "NO" Then
 ret1 = GetPrivateProfileString("Bakxj", "yy", "", buff, 256, "c:\cg.ini")
 Label13.Caption = buff
 MsgBox Label13.Caption
ElseIf Label13.Caption <= Date Then
 ret1 = GetPrivateProfileString("Bakxj", "yy", "", buff, 256, "c:\cg.ini")
 Label13.Caption = buff
 MsgBox Label13.Caption
 success1 = WritePrivateProfileString("Bakxj", "qs", "NO", "c:\cg.ini")
End If
Else
success = WritePrivateProfileString("OKxj", "yesno", "yes", "c:\cg.ini")
success1 = WritePrivateProfileString("Bakxj", "qs", backFile, "c:\cg.ini")
success2 = WritePrivateProfileString("Bakxj", "yy", Label13.Caption, "c:\cg.ini")
End If
End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -