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

📄 form1.frm

📁 获取操作系统启动权限
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2490
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5070
   LinkTopic       =   "Form1"
   ScaleHeight     =   2490
   ScaleWidth      =   5070
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command3 
      Caption         =   "SetDogName"
      Height          =   555
      Left            =   2745
      TabIndex        =   6
      Top             =   1800
      Width           =   1995
   End
   Begin VB.CheckBox Check1 
      Caption         =   "计时器"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   225
      TabIndex        =   4
      Top             =   1890
      Value           =   1  'Checked
      Width           =   1095
   End
   Begin VB.Timer Timer1 
      Interval        =   30000
      Left            =   1890
      Top             =   1845
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   555
      Left            =   2745
      TabIndex        =   1
      Top             =   945
      Width           =   2085
   End
   Begin VB.CommandButton Command1 
      Caption         =   "TellActive"
      Height          =   555
      Left            =   2745
      TabIndex        =   0
      Top             =   180
      Width           =   2130
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "Label3"
      Height          =   195
      Left            =   315
      TabIndex        =   5
      Top             =   1350
      Width           =   480
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Label2"
      Height          =   195
      Left            =   315
      TabIndex        =   3
      Top             =   765
      Width           =   480
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Label1"
      Height          =   195
      Left            =   315
      TabIndex        =   2
      Top             =   225
      Width           =   480
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim dog As Object
Dim cdog As Object

Private Sub Check1_Click()
    Timer1.Enabled = Check1.Value
End Sub

Private Sub Command1_Click()
    If dog.TellActive = False Then
        Label1.Caption = "false"
        End
    Else
        Label1.Caption = "true"
    End If
End Sub

Private Sub Command2_Click()
    Label2.Caption = cdog.Count
    Label3.Caption = dog.sDogKey & ":" & dog.GetDogName
End Sub

Private Sub Command3_Click()
    dog.LetDogName Me.Caption
End Sub

Private Sub Form_Load()
    Set cdog = CreateObject("dogserver.CDogServer")
    
    Set dog = cdog.GetDog
    Call Command1_Click
End Sub

Private Sub Form_Unload(Cancel As Integer)
    dog.TellQuit
    Set dog = Nothing
    Set cdog = Nothing
End Sub

Private Sub Timer1_Timer()
    Call Command1_Click
End Sub

⌨️ 快捷键说明

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