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

📄 form1.frm

📁 用vb读取标准segy数据
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   6435
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11595
   LinkTopic       =   "Form1"
   ScaleHeight     =   6435
   ScaleWidth      =   11595
   StartUpPosition =   3  '窗口缺省
   Begin VB.ListBox List3 
      Height          =   5460
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   3855
   End
   Begin VB.ListBox List2 
      Height          =   5640
      Left            =   7920
      TabIndex        =   4
      Top             =   120
      Width           =   3495
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Command3"
      Height          =   375
      Left            =   8400
      TabIndex        =   3
      Top             =   3840
      Width           =   615
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   2880
      Top             =   4200
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Open"
      Height          =   495
      Left            =   2160
      TabIndex        =   2
      Top             =   5880
      Width           =   1335
   End
   Begin VB.ListBox List1 
      Height          =   5640
      Left            =   4080
      TabIndex        =   1
      Top             =   120
      Width           =   3735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Read"
      Height          =   495
      Left            =   5160
      TabIndex        =   0
      Top             =   5880
      Width           =   1095
   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()
Dim c As Integer
Dim B As Single
Dim a As Long
For I = 1 To 5000
  Get #1, (I - 1) * 2 + 1, c
  Get #1, 3600 + (I - 1) * 4 + 1, a
  Get #1, 3600 + 240 + (I - 1) * 4 + 1, B
  List1.AddItem Str(I) + "     " + Str((I - 1) * 4 + 1) + "   " + Str(IBMToVBALong(a))
  
  List2.AddItem Str(I) + "     " + Str((I - 1) * 4 + 1) + "   " + Str(B) 'Str(IBMToVBASingle(B))
  List3.AddItem Str(I) + "     " + Str((I - 1) * 2 + 1) + "   " + Str(IBMToVBAInteger(c))
Next I
MsgBox "finised"
End Sub

Private Sub Command2_Click()
Close
 
CommonDialog1.Filter = " file(*.*)|*.*|All Files (*.*)|*.*|"
CommonDialog1.FilterIndex = 1
CommonDialog1.Action = 1
On Error GoTo errorfiles
CommonDialog1.InitDir = "c:\"
openfile = Trim(CommonDialog1.FileName)
Me.Caption = openfile
Open openfile For Binary As #1
errorfiles: Exit Sub

End Sub

Private Sub Command3_Click()
Dim a As Long
a = 100000
Me.Caption = IBMToVBALong(a)
End Sub

⌨️ 快捷键说明

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