copy.frm

 VERSION 5.00
Begin VB.Form Form2
   Caption         =   "Copy"
   ClientHeight    =   1920
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4470
   Icon            =   "copy.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1920
   ScaleWidth      =   4470
   StartUpPosition =   1  'CenterOwner
   Begin VB.CommandButton Command2
      Caption         =   "Cancel"
      Height          =   375
      Left            =   2760
      TabIndex        =   4
      Top             =   1320
      Width           =   1455
   End
   Begin VB.CommandButton Command1
      Caption         =   "Copy to Memory"
      Height          =   375
      Left            =   240
      TabIndex        =   3
      Top             =   1320
      Width           =   1455
   End
   Begin VB.OptionButton Option3
      Caption         =   "Copy Current Sector"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   840
      Width           =   1815
   End
   Begin VB.OptionButton Option2
      Caption         =   "Copy All File"
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   540
      Width           =   1455
   End
   Begin VB.OptionButton Option1
      Caption         =   "Copy Current Selection"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Value           =   -1  'True
      Width           =   2055
   End
   Begin VB.Label Label3
      ForeColor       =   &H80000010&
      Height          =   255
      Left            =   2280
      TabIndex        =   7
      Top             =   840
      Width           =   1815
   End
   Begin VB.Label Label2
      ForeColor       =   &H80000010&
      Height          =   255
      Left            =   2280
      TabIndex        =   6
      Top             =   540
      Width           =   1815
   End
   Begin VB.Label Label1
      ForeColor       =   &H80000010&
      Height          =   255
      Left            =   2280
      TabIndex        =   5
      Top             =   240
      Width           =   1815
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim X As Integer
Dim H1 As Integer
Dim H2 As Integer
Dim Z As Long
Dim Y As Byte
Dim T1 As String * 1
Dim T2 As String * 1

Private Sub Command1_Click()
Beep
If Option1.Value = True Then
   If Form1.Text1.Visible = True Then
      CopyString = Form1.Text1.Text
      Form1.Label1(X).BackColor = &HFFFFFF
      Form1.Label1(X).ForeColor = 0
      Form1.Label6(X).BackColor = &HFFFFFF
      Form1.Label6(X).ForeColor = &H808080
   Else
      If SFP > 0 And SL > 0 Then
         OldIndex = SFP - FF
         For X = OldIndex To OldIndex + SL - 1
            CopyString = CopyString + Form1.Label1(X).Caption
            Form1.Label1(X).BackColor = &HFFFFFF
            Form1.Label1(X).ForeColor = 0
            Form1.Label6(X).BackColor = &HFFFFFF
            Form1.Label6(X).ForeColor = &H808080
         Next X
         SFP = 0
         SL = 0
      End If
   End If
Else
   If Option2.Value = True Then
      If FL > 0 Then Call CopyFileStr
   Else
      For X = 0 To 511
          CopyString = CopyString + Form1.Label1(X).Caption
      Next X
   End If
End If
Unload Form2
End Sub

Private Sub Command2_Click()
Unload Form2
End Sub

Private Sub Form_Load()
CopyString = ""
If SL > 1 Then
   Label1.Caption = Str$(SL) + " bytes"
Else
   If Form1.Text1.Visible = True Then
      SL = 1
   End If
   Label1.Caption = Str$(SL) + " byte"
End If
If FL > 1 Then
   Label2.Caption = Str$(FL) + " bytes"
Else
   Label2.Caption = Str$(FL) + " byte"
End If
Label3.Caption = " 512 bytes"
End Sub

Private Sub CopyFileStr()
For Z = 1 To FL
    Get TmpFileNo, Z, Y
    H1 = Int(Y / 16)
    If H1 > 9 Then
       Select Case H1
              Case 10
                   T1 = "A"
              Case 11
                   T1 = "B"
              Case 12
                   T1 = "C"
              Case 13
                   T1 = "D"
              Case 14
                   T1 = "E"
              Case 15
                   T1 = "F"
              Case 16
                   T1 = "G"
       End Select
    Else
       T1 = Trim$(H1)
    End If
    H2 = Y - (H1 * 16)
    If H2 > 9 Then
       Select Case H2
              Case 10
                   T2 = "A"
              Case 11
                   T2 = "B"
              Case 12
                   T2 = "C"
              Case 13
                   T2 = "D"
              Case 14
                   T2 = "E"
              Case 15
                   T2 = "F"
              Case 16
                   T2 = "G"
       End Select
    Else
       T2 = Trim$(H2)
    End If
    CopyString = CopyString + T1 + T2
Next Z
End Sub

Project Homepage: