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

📄 propedit.frm

📁 超级C&C有没有搞错,VB还能编出这种即时策略游戏来!没错,这就是我们的超级C&C!虽然游戏经常无故退出,但是原码仍有很多可圈可点的地方.祝你早日编出中国的超级RA,超级KKND,超级星际,超级家园
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   8235
   ClientLeft      =   5295
   ClientTop       =   1965
   ClientWidth     =   6585
   LinkTopic       =   "Form1"
   ScaleHeight     =   8235
   ScaleWidth      =   6585
   Begin VB.CommandButton Command3 
      Caption         =   "Delete"
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   3720
      Width           =   855
   End
   Begin VB.ListBox List1 
      Height          =   2790
      Left            =   120
      TabIndex        =   4
      Top             =   840
      Width           =   2295
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Add"
      Height          =   255
      Left            =   2520
      TabIndex        =   3
      Top             =   480
      Width           =   855
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   120
      TabIndex        =   2
      Text            =   "Attribute"
      Top             =   480
      Width           =   2295
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Add"
      Height          =   255
      Left            =   2520
      TabIndex        =   1
      Top             =   120
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   120
      TabIndex        =   0
      Text            =   "Ability"
      Top             =   120
      Width           =   2295
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Open "Units.Dat" For Input As #1
Open "TmpUnits.Dat" For Output As #2
Do
  Do
    Line Input #1, a$
    If Left$(a$, 6) <> "ATTRIB" Then
      Print #2, a$
    Else
      Exit Do
    End If
  Loop

  Print #2, "ABILITY_" & UCase$(Text1.Text)
  Print #2, a$
  Do
    Line Input #1, a$
    If a$ <> "[OBJECTDEFEND]" Then
      Print #2, a$
    Else
      Print #2, a$
      Exit Do
    End If
  Loop
  Line Input #1, a$
  Print #2, a$
  If a$ = "[ENDOFFILE]" Then
    Exit Do
  End If
Loop
Close
End Sub
Private Sub Command2_Click()
Open "Units.Dat" For Input As #1
Open "TmpUnits.Dat" For Output As #2
Do
  Do
    Line Input #1, a$
    If a$ <> "[OBJECTDEFEND]" Then
      Print #2, a$
    Else
      Exit Do
    End If
  Loop

  Print #2, "ATTRIBUTE_" & UCase$(Text2.Text)
  Print #2, a$
  
  Line Input #1, a$
  Print #2, a$
  If a$ = "[ENDOFFILE]" Then
    Exit Do
  End If
Loop
Close
End Sub

Private Sub Command3_Click()
Open "ObjectFormat.Dat" For Input As #1
Open "TmpFormat.Dat" For Output As #2
Do
  Line Input #1, a$
  If a$ = "[ENDOFFILE]" Then Exit Do
  If a$ = "[OBJTAGDEF]" Then
    Line Input #1, a$
    If a$ <> List1.List(List1.ListIndex) Then
      Print #2, "[OBJTAGDEF]"
      Print #2, a$
      Do
        Line Input #1, a$
        If a$ <> "[ENDOBJDEF]" Then
          Print #2, a$
        Else
          Print #2, a$
          Exit Do
        End If
      Loop
    Else
      Do
        Line Input #1, a$
        If a$ = "[ENDOBJDEF]" Then
          Exit Do
        End If
      Loop
    End If
  Else
    Print #2, a$
  End If
Loop
Print #2, "[ENDOFFILE]"
Close
Open "Units.Dat" For Input As #1
Open "TmpUnits.Dat" For Output As #2
  Do
    Line Input #1, a$
    If a$ = "[ENDOFFILE]" Then Exit Do
    If Left$(a$, Len(List1.List(List1.ListIndex))) <> List1.List(List1.ListIndex) Then
      Print #2, a$
    End If
  Loop
  Print #2, "[ENDOFFILE]"
Close
End Sub

Private Sub Form_Load()
Open "ObjectFormat.Dat" For Input As #1
Do
  Line Input #1, a$
  If a$ = "[OBJTAGDEF]" Then
    Line Input #1, a$
    List1.AddItem a$
  ElseIf a$ = "[ENDOFFILE]" Then
    Exit Do
  End If
Loop
Close
End Sub

⌨️ 快捷键说明

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