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

📄 formtest.frm

📁 显示当前时间
💻 FRM
字号:
VERSION 5.00
Object = "{F7E6FD03-521A-11D2-BEA3-000021DAEE5C}#2.0#0"; "LED.OCX"
Begin VB.Form Form1 
   BackColor       =   &H80000001&
   Caption         =   "Form1"
   ClientHeight    =   2055
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6405
   Icon            =   "FormTest.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2055
   ScaleWidth      =   6405
   StartUpPosition =   3  'Windows Default
   Begin LedOCX.LED LED1 
      Height          =   855
      Left            =   180
      TabIndex        =   7
      Top             =   180
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   1508
      ForeColor       =   12648447
      BackColor       =   8388608
      BorderStyle     =   1
      LEDSIZE         =   120
      LEDWIDTH        =   1
      LEDSTRING       =   ""
      LEDLEFT         =   60
      LEDTOP          =   60
      LEDXYRATE       =   1
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   2580
      TabIndex        =   6
      Text            =   "Text3"
      Top             =   1560
      Width           =   1155
   End
   Begin VB.CommandButton Command3 
      Caption         =   "LED Rate"
      Height          =   375
      Left            =   2580
      TabIndex        =   5
      Top             =   1140
      Width           =   1155
   End
   Begin LedOCX.LED LED2 
      DragMode        =   1  'Automatic
      Height          =   555
      Left            =   3900
      TabIndex        =   4
      Top             =   1380
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   979
      ForeColor       =   49152
      BackColor       =   0
      BorderStyle     =   1
      LEDSIZE         =   160
      LEDWIDTH        =   1
      LEDSTRING       =   "123"
      LEDLEFT         =   60
      LEDTOP          =   60
      LEDXYRATE       =   0.8
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1380
      TabIndex        =   3
      Text            =   "Text2"
      Top             =   1560
      Width           =   1155
   End
   Begin VB.CommandButton Command2 
      Caption         =   "LED Width"
      Height          =   375
      Left            =   1380
      TabIndex        =   2
      Top             =   1140
      Width           =   1155
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   180
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   1560
      Width           =   1155
   End
   Begin VB.CommandButton Command1 
      Caption         =   "LED Size"
      Height          =   375
      Left            =   180
      TabIndex        =   0
      Top             =   1140
      Width           =   1155
   End
   Begin VB.Timer Timer1 
      Interval        =   50
      Left            =   5220
      Top             =   2100
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim addition As Integer
Private Sub Command1_Click()
 'LED1.SetLineWidth (CInt(Text1.Text))
 LED1.LEDSIZE = CInt(Text1.Text)
End Sub

Private Sub Command2_Click()
 LED1.LEDWIDTH = CInt(Text2.Text)
End Sub

Private Sub Command3_Click()
 LED1.LEDXYRATE = CVar(Text3.Text)
End Sub

Private Sub Form_Load()
 
 Text1.Text = LED1.LEDSIZE
 Text2.Text = LED1.LEDWIDTH
 Text3.Text = LED1.LEDXYRATE
 
 LED2.LEDSTRING = Left(CStr(Now()), 8)
 addition = 30
End Sub

Private Sub Timer1_Timer()
 Dim sNow$
 sNow = CStr(Now())
 'LED1.DRAW_LED 30, 30, snow, True
 
 If LED1.LEDLEFT <= 0 Then
  addition = 30
 Else
  If LED1.LEDLEFT + LED1.LEDLONG > 6000 Then addition = -30
 End If
 LED1.LEDLEFT = LED1.LEDLEFT + addition
 LED1.LEDTOP = (LED1.Height - LED1.LEDHIGH) / 2
 LED1.LEDSTRING = Right(sNow, 8)
End Sub

⌨️ 快捷键说明

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