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

📄 frm_main.frm

📁 基于51和VB的广告牌控制系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form frm_Main 
   AutoRedraw      =   -1  'True
   BorderStyle     =   0  'None
   ClientHeight    =   6555
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   8145
   ForeColor       =   &H00FFFFFF&
   Icon            =   "frm_Main.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   437
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   543
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      Height          =   3060
      Left            =   3240
      ScaleHeight     =   3000
      ScaleWidth      =   4200
      TabIndex        =   11
      Top             =   2040
      Visible         =   0   'False
      Width           =   4260
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   7740
      Top             =   1755
   End
   Begin AdControl.ctrl_TransparetForm ctrl_TransparetForm 
      Height          =   495
      Left            =   2280
      TabIndex        =   9
      Top             =   120
      Width           =   495
      _ExtentX        =   873
      _ExtentY        =   873
   End
   Begin VB.PictureBox pic_Viewport 
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      Height          =   3015
      Left            =   3240
      ScaleHeight     =   3015
      ScaleWidth      =   4215
      TabIndex        =   8
      Top             =   2040
      Width           =   4215
   End
   Begin AdControl.ctrl_SkinableButton ctrl_btn_Previous 
      Height          =   375
      Left            =   3135
      TabIndex        =   5
      Top             =   5340
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   661
      Caption         =   "上一张"
   End
   Begin MSComctlLib.ImageList iml_Toolbar 
      Left            =   705
      Top             =   0
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   12
      ImageHeight     =   12
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   9
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":29C12
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":29F82
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":2A2F6
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":2A683
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":2AA2E
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":2ADC0
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":2B152
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":2B4E2
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frm_Main.frx":2B86D
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin AdControl.ctrl_PullDownMenu ctrl_PullDownMenu 
      Height          =   375
      Left            =   135
      TabIndex        =   3
      Top             =   780
      Width           =   7815
      _ExtentX        =   13785
      _ExtentY        =   661
      ForeColor       =   16777215
      BackColor       =   4934218
      HideBorder      =   -1  'True
   End
   Begin AdControl.ctrl_Panel ctrl_Panel 
      Height          =   3255
      Left            =   3120
      TabIndex        =   2
      Top             =   1950
      Width           =   4455
      _ExtentX        =   7858
      _ExtentY        =   5741
   End
   Begin AdControl.ctrl_ListObject ctrl_ListObject 
      Height          =   3645
      Left            =   630
      TabIndex        =   1
      Top             =   1950
      Width           =   2175
      _ExtentX        =   3836
      _ExtentY        =   6429
      MouseDownColor  =   16777215
   End
   Begin AdControl.ctrl_SkinableForm ctrl_SkinableForm 
      Height          =   735
      Left            =   0
      TabIndex        =   0
      Top             =   60
      Width           =   735
      _ExtentX        =   7223
      _ExtentY        =   2990
      MaximizeBtn     =   0   'False
      Caption         =   "黎明大学第三届校科技节作品展览"
      SkinPath        =   ""
      BackColor       =   4934218
      ForeColor       =   16777215
      SystemIcon      =   0   'False
      AllowResizing   =   0   'False
   End
   Begin AdControl.ctrl_SkinableButton ctrl_btn_Next 
      Height          =   375
      Left            =   4695
      TabIndex        =   6
      Top             =   5340
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   661
      Caption         =   "下一张"
   End
   Begin AdControl.ctrl_SkinableButton ctrl_btn_dq 
      Height          =   375
      Left            =   6255
      TabIndex        =   7
      Top             =   5340
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   661
      Caption         =   "当前页"
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   1440
      Top             =   0
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
      InputLen        =   1
      NullDiscard     =   -1  'True
      OutBufferSize   =   1024
      RThreshold      =   1
      RTSEnable       =   -1  'True
      BaudRate        =   2400
      InputMode       =   1
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "黎明大学第三届校科技节作品展览"
      BeginProperty Font 
         Name            =   "华文新魏"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C0E0FF&
      Height          =   540
      Left            =   330
      TabIndex        =   10
      Top             =   1335
      Width           =   7455
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      X1              =   7
      X2              =   535
      Y1              =   405
      Y2              =   405
   End
   Begin VB.Label lbl_Statusbar 
      BackStyle       =   0  'Transparent
      Caption         =   "黎明大学第三届校科技节展览……"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   195
      Left            =   285
      TabIndex        =   4
      Top             =   6120
      Width           =   7545
   End
End
Attribute VB_Name = "frm_Main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long

Dim color As Variant      '存放颜色数组
Dim ci As Integer
Dim js As Integer         '计数器显示但前第几张
Dim zs As Integer         '广告张数
Dim sjjg As Integer       '广告显示时间间隔单位1秒

Dim inbyte() As Byte
Dim outbyte(1 To 1) As Byte

Private Sub ctrl_btn_dq_Click()
outbyte(1) = 255                 '向下位机获取当前参数
    MSComm1.Output = outbyte
    MSComm1.OutBufferCount = 0       '清空缓存
End Sub

Private Sub ctrl_btn_Next_Click()
js = js + 1
If js = zs + 1 Then
js = 1
End If

Picture1.Picture = LoadPicture(App.Path + "\image\" & js & ".jpg")

Call picload

End Sub

Function picload()
Dim suiji2 As Integer

Randomize ' 对随机数生成器做初始化的动作

suiji2 = Int(Rnd * 4 + 1) '生成1-4内的随机数

pic_Viewport.Picture = LoadPicture("")  '清空

Select Case suiji2

Case 1:
pic_Viewport.Cls

⌨️ 快捷键说明

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