?? configfrm.frm
字號:
VERSION 5.00
Begin VB.Form ConfigFrm
BorderStyle = 3 'Fixed Dialog
Caption = "通用抽獎軟件"
ClientHeight = 4470
ClientLeft = 45
ClientTop = 330
ClientWidth = 6540
Icon = "ConfigFrm.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 298
ScaleMode = 3 'Pixel
ScaleWidth = 436
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton Command3
Caption = "使用說明"
Height = 375
Left = 2184
TabIndex = 23
Top = 960
Width = 915
End
Begin VB.TextBox txtInfo
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 405
Left = 3120
TabIndex = 20
Top = 2640
Width = 2895
End
Begin VB.CommandButton Command2
Caption = "情感故事會"
Height = 375
Left = 3156
TabIndex = 19
Top = 960
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "網際播音"
Height = 375
Left = 4308
TabIndex = 18
Top = 960
Width = 915
End
Begin VB.CommandButton CmdStart
Caption = "進入.."
Height = 375
Left = 240
TabIndex = 17
Top = 960
Width = 915
End
Begin VB.CommandButton CmdConfig
Caption = "配置>>"
Height = 375
Left = 1212
TabIndex = 16
Top = 960
Width = 915
End
Begin VB.CommandButton CmdExit
Caption = "退出"
Height = 375
Left = 5280
TabIndex = 15
Top = 960
Width = 915
End
Begin VB.CommandButton CmdConfirm
Caption = "保存(&S)"
Height = 375
Left = 4560
TabIndex = 13
Top = 3600
Width = 1215
End
Begin VB.Frame Frame1
Caption = "參數配置"
Height = 2415
Left = 120
TabIndex = 0
Top = 1800
Width = 6255
Begin VB.TextBox txtName
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 405
Left = 960
TabIndex = 11
Top = 360
Width = 5055
End
Begin VB.TextBox txtSpecial
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 405
Left = 960
TabIndex = 9
Top = 1320
Width = 855
End
Begin VB.TextBox txtThird
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 405
Left = 3000
TabIndex = 7
Top = 1800
Width = 735
End
Begin VB.TextBox txtSecond
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 405
Left = 960
TabIndex = 5
Top = 1800
Width = 855
End
Begin VB.TextBox txtFirst
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 405
Left = 3000
TabIndex = 3
Top = 1320
Width = 735
End
Begin VB.TextBox txtAll
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 405
Left = 960
TabIndex = 2
Top = 840
Width = 855
End
Begin VB.Label Label9
Caption = "中獎祝福:"
Height = 255
Left = 2160
TabIndex = 22
Top = 960
Width = 975
End
Begin VB.Label Label6
Caption = "活動名稱:"
Height = 255
Left = 120
TabIndex = 12
Top = 480
Width = 975
End
Begin VB.Label Label5
Caption = "特等獎: 名"
Height = 255
Left = 120
TabIndex = 10
Top = 1440
Width = 2055
End
Begin VB.Label Label4
Caption = "三等獎: 名"
Height = 255
Left = 2160
TabIndex = 8
Top = 1920
Width = 2055
End
Begin VB.Label Label2
Caption = "二等獎: 名"
Height = 255
Left = 120
TabIndex = 6
Top = 1920
Width = 2055
End
Begin VB.Label Label3
Caption = "一等獎: 名"
Height = 255
Left = 2160
TabIndex = 4
Top = 1440
Width = 2055
End
Begin VB.Label Label1
Caption = "總票數: 人"
Height = 255
Left = 120
TabIndex = 1
Top = 960
Width = 2775
End
End
Begin VB.Label Label8
Caption = "活動名稱:"
Height = 255
Left = 1920
TabIndex = 21
Top = 2880
Width = 975
End
Begin VB.Label Label7
Caption = $"ConfigFrm.frx":72FA
Height = 735
Left = 240
TabIndex = 14
Top = 120
Width = 6015
End
End
Attribute VB_Name = "ConfigFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim objProfile As New Profile
Private Sub CmdConfig_Click()
If CmdConfig.Caption = "配置>>" Then
Me.Height = 4800
CmdConfig.Caption = "配置<<"
Else
Me.Height = 2200
CmdConfig.Caption = "配置>>"
End If
End Sub
Private Sub saveConfig()
If txtName.Text = "" Then
MsgBox "請輸入活動名稱!"
Exit Sub
End If
If txtInfo.Text = "" Then
MsgBox "請輸入中獎祝福,即中獎后上方顯示的信息!"
Exit Sub
End If
If txtAll.Text = "" Then
MsgBox "請輸入總票數!"
Exit Sub
Else
If Not IsNumeric(txtFirst.Text) Then
MsgBox "總票數必須輸入數字"
End If
End If
If txtFirst.Text = "" Then
MsgBox "請輸入一等獎數量!"
Exit Sub
Else
If Not IsNumeric(txtFirst.Text) Then
MsgBox "一等獎數量必須輸入數字"
End If
End If
If txtSecond.Text = "" Then
MsgBox "請輸入二等獎數量!"
Exit Sub
Else
If Not IsNumeric(txtSecond.Text) Then
MsgBox "二等獎數量必須輸入數字"
End If
End If
If txtThird.Text = "" Then
MsgBox "請輸入三等獎數量!"
Exit Sub
Else
If Not IsNumeric(txtThird.Text) Then
MsgBox "三等獎數量必須輸入數字"
End If
End If
If txtSpecial.Text = "" Then
MsgBox "請輸入特等獎數量!"
Exit Sub
Else
If Not IsNumeric(txtSpecial.Text) Then
MsgBox "特等獎數量必須輸入數字"
End If
End If
actionName = txtName.Text
actionInfo = txtInfo.Text
firstCount = toNum(txtFirst.Text)
secondCount = toNum(txtSecond.Text)
thirdCount = toNum(txtThird.Text)
specialCount = toNum(txtSpecial.Text)
allCount = toNum(txtAll.Text)
With objProfile
.FileName = App.path + "\config.ini"
.SetValue "系統設置", "活動名稱", actionName
.SetValue "系統設置", "總票數", allCount
.SetValue "系統設置", "特等獎數量", specialCount
.SetValue "系統設置", "一等獎數量", firstCount
.SetValue "系統設置", "二等獎數量", secondCount
.SetValue "系統設置", "三等獎數量", thirdCount
.SetValue "系統設置", "中獎祝福", actionInfo
End With
End Sub
Private Sub CmdConfirm_Click()
saveConfig
CmdConfig_Click
MsgBox "參數設置成功"
End Sub
Private Sub CmdExit_Click()
Unload Me
End Sub
Private Sub CmdStart_Click()
saveConfig
SelectFrm.Show 1
End Sub
Private Sub Command1_Click()
ShellExecute Me.hWnd, "open", "http://www.pinksofts.com/speak", "", "", SW_SHOW
End Sub
Private Sub Command2_Click()
ShellExecute Me.hWnd, "open", "http://www.pinksofts.com/", "", "", SW_SHOW
End Sub
Private Sub Command3_Click()
ShellExecute Me.hWnd, "open", "http://www.pinksofts.com/speak/lotto.htm", "", "", SW_SHOW
End Sub
Private Sub Form_Load()
Me.Height = 2200
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)
'Me.Picture = LoadPicture(App.path & "/images/first.jpg")
With objProfile
.FileName = App.path + "\config.ini"
actionName = .GetValue("系統設置", "活動名稱")
allCount = toNum(.GetValue("系統設置", "總票數"))
specialCount = toNum(.GetValue("系統設置", "特等獎數量"))
firstCount = toNum(.GetValue("系統設置", "一等獎數量"))
secondCount = toNum(.GetValue("系統設置", "二等獎數量"))
thirdCount = toNum(.GetValue("系統設置", "三等獎數量"))
actionInfo = .GetValue("系統設置", "中獎祝福")
End With
txtName.Text = actionName
txtInfo.Text = actionInfo
txtFirst.Text = firstCount
txtSecond.Text = secondCount
txtThird.Text = thirdCount
txtSpecial.Text = specialCount
txtAll.Text = allCount
End Sub
Function toNum(num As String) As Integer
Dim tmpNum As Integer
If IsNumeric(num) Then tmpNum = CInt(num) Else tmpNum = 1
toNum = tmpNum
End Function
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 + -