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

📄 frmsplash.frm

📁 一个不错的数控源码是vb的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSplash 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   3810
   ClientLeft      =   255
   ClientTop       =   1410
   ClientWidth     =   6960
   ClipControls    =   0   'False
   ControlBox      =   0   'False
   Icon            =   "frmSplash.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3810
   ScaleWidth      =   6960
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   3570
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6720
      Begin VB.Timer Timer1 
         Interval        =   100
         Left            =   6000
         Top             =   3600
      End
      Begin VB.Label lblWorkPlace 
         Caption         =   "Label1"
         Height          =   255
         Left            =   3960
         TabIndex        =   8
         Top             =   3240
         Width           =   1575
      End
      Begin VB.Label lblWriter 
         Caption         =   "Label1"
         Height          =   255
         Left            =   3960
         TabIndex        =   7
         Top             =   3000
         Width           =   1095
      End
      Begin VB.Image imgLogo 
         Height          =   1065
         Left            =   480
         Picture         =   "frmSplash.frx":0CCA
         Stretch         =   -1  'True
         Top             =   840
         Width           =   1095
      End
      Begin VB.Label lblCopyright 
         Caption         =   "版权所有"
         Height          =   255
         Left            =   3720
         TabIndex        =   3
         Top             =   2640
         Width           =   2415
      End
      Begin VB.Label lblWarning 
         Caption         =   "警告"
         Height          =   195
         Left            =   150
         TabIndex        =   2
         Top             =   3660
         Width           =   6765
      End
      Begin VB.Label lblVersion 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "版本"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   5640
         TabIndex        =   4
         Top             =   2160
         Width           =   510
      End
      Begin VB.Label lblPlatform 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "平台"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   5640
         TabIndex        =   5
         Top             =   1800
         Width           =   510
      End
      Begin VB.Label lblProductName 
         AutoSize        =   -1  'True
         Caption         =   "产品"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   26.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   525
         Left            =   1920
         TabIndex        =   6
         Top             =   840
         Width           =   1080
      End
      Begin VB.Label lblLicenseTo 
         Alignment       =   1  'Right Justify
         Caption         =   "授权"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   6255
      End
   End
End
Attribute VB_Name = "frmSplash"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim t1 As Long

Private Sub Form_KeyPress(KeyAscii As Integer)
    Unload Me
End Sub

Private Sub Form_Load()
    lblVersion.Caption = "版本 " & App.Major & "." & App.Minor & "." & App.Revision
    lblProductName.Caption = App.Title
    
    lblWriter.Caption = "田志旗"
    lblWorkPlace.Caption = "山西师范大学"
    InitialBoard                           '初始化板卡
    
    t1 = Second(Now)
End Sub

Private Sub Frame1_Click()
    Unload Me
End Sub

Private Sub Frame1_DblClick()
    Unload Me
End Sub
'*****************************************
'对板卡进行设置,可在窗体加载时调用
Private Function SetBoard() As Long
    Dim Rtn As Long
    
    On Error Resume Next
    Rtn = auto_set()            '对板卡进行自动设置
    If Rtn <= 0 Then            '若自动设置错误则返回-1
        SetBoard = -1
        Exit Function
    End If
    Rtn = init_board            '初始化板卡
    If Rtn <> 0 Then            '若自动设置错误则返回-2
        SetBoard = -2
        Exit Function
    End If
    SetBoard = 0                '正确返回0
End Function
'********************************************************
'初始化板卡及参数
Public Sub InitialBoard()
    Dim temp As Long
    Dim i As Long
    
    ''''''''''''''''''''''''''''''''''''
    '初始化板卡
        
    temp = SetBoard
    If temp < 0 Then
        MsgBox "初始化错误,请检查运动控制卡是否正确插入您的计算机," _
               & "并且是否安装了相应的驱动程序", vbOKOnly + vbCritical
        frmMain.lblMsg.Caption = "初始化错误"
        Exit Sub
    End If
End Sub

Private Sub Timer1_Timer()
    Dim t2 As Long
    t2 = Second(Now)
    
    If t2 - t1 = 2 Then
        Unload Me
    End If
End Sub

⌨️ 快捷键说明

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