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

📄 frmtip.frm

📁 商品销售管理系统对商品销售信息进行日常的管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmTip 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "帮助"
   ClientHeight    =   4965
   ClientLeft      =   2355
   ClientTop       =   2385
   ClientWidth     =   5805
   Icon            =   "frmTip.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4965
   ScaleWidth      =   5805
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdNextTip 
      Caption         =   "下一条提示(&N)"
      Height          =   375
      Left            =   2475
      TabIndex        =   2
      Top             =   4485
      Width           =   1455
   End
   Begin VB.CommandButton cmdOK 
      Cancel          =   -1  'True
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   4110
      TabIndex        =   0
      Top             =   4485
      Width           =   1455
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00FFFFFF&
      Height          =   4275
      Left            =   135
      Picture         =   "frmTip.frx":000C
      ScaleHeight     =   4215
      ScaleWidth      =   5490
      TabIndex        =   1
      Top             =   120
      Width           =   5550
      Begin VB.Label Label1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "您知道吗..."
         Height          =   255
         Left            =   540
         TabIndex        =   4
         Top             =   180
         Width           =   2655
      End
      Begin VB.Label lblTipText 
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   3405
         Left            =   195
         TabIndex        =   3
         Top             =   645
         Width           =   5160
      End
   End
End
Attribute VB_Name = "frmTip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' 内存中的提示数据库。
Dim Tips As New Collection
' 提示文件名称
Const TIP_FILE = "XSGL.TXT"
' 当前正在显示的提示集合的索引。
Dim CurrentTip As Long
Dim ShowAtStartup As Long
Private Sub DoNextTip()
' 按顺序提示
  CurrentTip = CurrentTip + 1
  If Tips.Count < CurrentTip Then
      CurrentTip = 1
  End If
' 显示它。
  frmTip.DisplayCurrentTip
End Sub
Function LoadTips(sFile As String) As Boolean
  Dim NextTip As String   ' 从文件中读出的每条提示。
  Dim InFile As Integer   ' 文件的描述符。
  ' 包含下一个自由文件描述符。
  InFile = FreeFile
  ' 确定为指定文件。
  If sFile = "" Then
      LoadTips = False
      Exit Function
  End If
  ' 在打开前确保文件存在。
  If Dir(sFile) = "" Then
      LoadTips = False
      Exit Function
  End If
  ' 从文本文件中读取集合。
  Open sFile For Input As InFile
  While Not EOF(InFile)
      Line Input #InFile, NextTip
      Tips.Add NextTip
  Wend
  Close InFile
  ' 显示一条提示。
  DoNextTip
  LoadTips = True
End Function
Private Sub Form_Load()
  If LoadTips(App.Path & "\" & TIP_FILE) = False Then
     lblTipText.Caption = "文件 " & TIP_FILE & " 没有被找到吗? " & vbCrLf & vbCrLf & _
         "创建文本文件名为 " & TIP_FILE & " 使用记事本每行写一条提示。 " & _
         "然后将它存放在应用程序所在的目录 "
  End If
End Sub
Public Sub DisplayCurrentTip()
  If Tips.Count > 0 Then
     lblTipText.Caption = Tips.Item(CurrentTip)
  End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
  frm_main.Enabled = True
End Sub
Private Sub cmdNextTip_Click()
  '显示下一条提示
  DoNextTip
  lblTipText.Caption = Tips.Item(CurrentTip)
End Sub
Private Sub cmdOK_Click()
  Call CmdEnd(Me)
End Sub

⌨️ 快捷键说明

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