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

📄 selectfrm.frm

📁 通用抽奖程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form SelectFrm 
   BackColor       =   &H000000FF&
   BorderStyle     =   0  'None
   Caption         =   "2006年互软年会抽奖区"
   ClientHeight    =   9660
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   11640
   FillColor       =   &H000000FF&
   Icon            =   "SelectFrm.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   9660
   ScaleWidth      =   11640
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.CommandButton Command1 
      Appearance      =   0  'Flat
      Cancel          =   -1  'True
      Caption         =   "结束抽奖"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2040
      TabIndex        =   6
      Top             =   3720
      Width           =   1215
   End
   Begin VB.PictureBox picPane 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   12960
      Left            =   600
      Picture         =   "SelectFrm.frx":72FA
      ScaleHeight     =   864
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   1152
      TabIndex        =   0
      Top             =   360
      Width           =   17280
      Begin VB.CommandButton CmdSpecial 
         Caption         =   "特等奖"
         BeginProperty Font 
            Name            =   "隶书"
            Size            =   39.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Left            =   7200
         TabIndex        =   5
         Top             =   4200
         Width           =   3615
      End
      Begin VB.CommandButton cmdPrize3 
         Appearance      =   0  'Flat
         BackColor       =   &H000000FF&
         Caption         =   "三等奖"
         Default         =   -1  'True
         BeginProperty Font 
            Name            =   "隶书"
            Size            =   39.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Left            =   7200
         TabIndex        =   3
         Top             =   8640
         Width           =   3615
      End
      Begin VB.CommandButton cmdPrize2 
         Caption         =   "二等奖"
         BeginProperty Font 
            Name            =   "隶书"
            Size            =   39.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Left            =   7200
         TabIndex        =   2
         Top             =   7200
         Width           =   3615
      End
      Begin VB.CommandButton cmdPrize1 
         Caption         =   "一等奖"
         BeginProperty Font 
            Name            =   "隶书"
            Size            =   39.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   975
         Left            =   7200
         TabIndex        =   1
         Top             =   5640
         Width           =   3615
      End
      Begin VB.Label txtName 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   41.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   855
         Left            =   4200
         TabIndex        =   4
         Top             =   2760
         Width           =   9375
      End
   End
End
Attribute VB_Name = "SelectFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdPrize1_Click()
    prizeType = 1
    PrizeFrm.Show 1
End Sub

Private Sub cmdPrize2_Click()
    prizeType = 2
    PrizeFrm.Show 1
End Sub

Private Sub cmdPrize3_Click()
    prizeType = 3
    PrizeFrm.Show 1
End Sub

Private Sub CmdSpecial_Click()
    prizeType = 4
    PrizeFrm.Show 1
End Sub

Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    prizeType = 1
    Me.BackColor = RGB(203, 1, 1)
    picPane.Picture = LoadPicture(App.path & "/images/select.jpg")
    picPane.Left = (Screen.Width - picPane.Width) / 2
    picPane.Top = (Screen.Height - picPane.Height) / 2
    txtName.Caption = actionName
    
    Dim A As Integer, path As String, APPPATH As String
    '获得当前路径8.3格式的短路径名
    If Right(App.path, 1) = "\" Then path = App.path Else path = App.path & "\"
    APPPATH = String$(165, 0)
    A = GetShortPathName(path, APPPATH, 164)
    APPPATH = Left(APPPATH, InStr(APPPATH, Chr(0)) - 1)
    Res = mciSendString("play " & APPPATH & "images\music.mid from 3000 to 8000", Ret, 1024, 0)

    
    With Command1
        .Left = 100
        .Top = Screen.Height - 600
    End With
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Res = mciSendString("close all", Ret, 1024, 0)
End Sub

⌨️ 快捷键说明

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