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

📄 module1.bas

📁 超级大乐透缩水选号器 Ver1.0 一款很专业
💻 BAS
字号:
Attribute VB_Name = "Module1"
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/12/17
'描    述:明发-超级大乐透缩水选号器 Ver1.0
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Dim Score As Long
Dim AscRand As Long
Dim num1, num2, sum As Double
Public Function Calc(Srt1 As Double, Srt2 As Double, CMD As Integer) As Double
On Error Resume Next
num1 = CDbl(Srt1)
num2 = CDbl(Srt2)

Select Case CMD
Case 1 '+
sum = num1 + num2
Calc = CStr(sum)

Case 2 '-
sum = num1 - num2
Calc = CStr(sum)

Case 3 '*
sum = num1 * num2
Calc = CStr(sum)

Case 4 '/
sum = num1 / num2
Calc = CStr(sum)

End Select

End Function
Function CendRan(Min_Integer As Long, Max_Integer As Long) As Long
Randomize
Score = Rnd * (Max_Integer - Min_Integer) + Min_Integer
CendRan = Score
End Function

Function AscRan(Score_Integer As Long) As Long
Randomize
AscRand = Int(Score_Integer * Rnd)
AscRan = AscRand
End Function

Function OCNum(NumBerIndex) As Boolean
Select Case NumBerIndex
Case "01"
OCNum = False
Case "02"
OCNum = True
Case "03"
OCNum = False
Case "04"
OCNum = True
Case "05"
OCNum = False
Case "06"
OCNum = True
Case "07"
OCNum = False
Case "08"
OCNum = True
Case "09"
OCNum = False
Case "10"
OCNum = True
Case "11"
OCNum = False
Case "12"
OCNum = True
Case "13"
OCNum = False
Case "14"
OCNum = True
Case "15"
OCNum = False
Case "16"
OCNum = True
Case "17"
OCNum = False
Case "18"
OCNum = True
Case "19"
OCNum = False
Case "20"
OCNum = True
Case "21"
OCNum = False
Case "22"
OCNum = True
Case "23"
OCNum = False
Case "24"
OCNum = True
Case "25"
OCNum = False
Case "26"
OCNum = True
Case "27"
OCNum = False
Case "28"
OCNum = True
Case "29"
OCNum = False
Case "30"
OCNum = True
Case "31"
OCNum = False
Case "32"
OCNum = True
Case "33"
OCNum = False
Case "34"
OCNum = True
Case "35"
OCNum = False

End Select
End Function

Function WriteTxtAppend(file1 As String, Text1 As String) As Boolean
 
 On Error GoTo err1
 Dim fn As Integer
 fn = FreeFile()
 Open file1 For Append As #fn
 Print #fn, Text1
 Close #fn
 WriteTxtAppend = True
Exit Function
err1:
 WriteTxtAppend = False
End Function
Function ReadTXT(file1 As String) As String
 On Error GoTo err1
 Dim fn As Integer
 Dim ss As String, S As String
  
 fn = FreeFile()
 Open file1 For Input As #fn
 Do While Not EOF(fn)
  
 Line Input #fn, S
 If ss = "" Then
 ss = S
 Else
 ss = ss + Chr(13) + Chr(10) + S
 End If
 Loop
 Close #fn
 ReadTXT = ss
  
Exit Function
err1:
 Close #fn
End Function


⌨️ 快捷键说明

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