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

📄 miscfunctions.bas

📁 超级C&C有没有搞错,VB还能编出这种即时策略游戏来!没错,这就是我们的超级C&C!虽然游戏经常无故退出,但是原码仍有很多可圈可点的地方.祝你早日编出中国的超级RA,超级KKND,超级星际,超级家园
💻 BAS
字号:
Attribute VB_Name = "MiscFunctions"
Public Function ConvertTrueFalse(VarBlE) As Boolean
If VarBlE = "True" Then ConvertTrueFalse = True Else ConvertTrueFalse = False
End Function
Public Function GetCommandLineArg(ArguementString$) As String
GamePlace = InStr(1, LCase$(Command$), ArguementString$)
If GamePlace > 0 Then
  BeginSpacePlace = InStr(GamePlace + 5, Command$, " ")
  EndSpacePlace = InStr(BeginSpacePlace + 1, Command$, " ")
  If EndSpacePlace = 0 Then EndSpacePlace = Len(Command$) + 1
  GetCommandLineArg = Mid$(Command$, BeginSpacePlace, EndSpacePlace - BeginSpacePlace)
Else
  GetCommandLineArg = "NULL"
End If
End Function
Public Function GetPropertyValue(TextString) As String
GetPropertyValue = Right$(TextString, Len(TextString) - InStr(1, TextString, " "))
End Function
Public Function GetPropertyName(TextString) As String
If InStr(1, TextString, " ") = 0 Then
  GetPropertyName = TextString
Else
  GetPropertyName = Left$(TextString, InStr(1, TextString, " ") - 1)
End If
End Function
Public Function RemoveSpaces(Txt)
NewTxt = Txt
Do
  If Left$(NewTxt, 1) = " " Then
    NewTxt = Right$(NewTxt, Len(NewTxt) - 1)
  Else
    Exit Do
  End If
Loop
RemoveSpaces = NewTxt
End Function

Public Sub Wait(TimeAmount)
EndTime = Timer + TimeAmount
Do
  DoEvents
  If Timer > EndTime Then Exit Do
Loop
End Sub

⌨️ 快捷键说明

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