paste.frm

 VERSION 5.00
Begin VB.Form Form3
   Caption         =   "Paste"
   ClientHeight    =   2895
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   Icon            =   "paste.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2895
   ScaleWidth      =   4680
   StartUpPosition =   1  'CenterOwner
   Begin VB.OptionButton Option7
      Caption         =   "Insert"
      Height          =   255
      Left            =   3240
      TabIndex        =   9
      Top             =   720
      Width           =   1095
   End
   Begin VB.OptionButton Option6
      Caption         =   "Overwrite"
      Height          =   255
      Left            =   3240
      TabIndex        =   7
      Top             =   360
      Value           =   -1  'True
      Width           =   1215
   End
   Begin VB.Frame Frame1
      Height          =   1935
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   2895
      Begin VB.OptionButton Option5
         Caption         =   "Paste to current position in file"
         Height          =   375
         Left            =   120
         TabIndex        =   8
         Top             =   1440
         Width           =   2535
      End
      Begin VB.OptionButton Option4
         Caption         =   "Paste to beginning of file"
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   1140
         Width           =   2175
      End
      Begin VB.OptionButton Option1
         Caption         =   "Paste to current byte posisiton"
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   240
         Value           =   -1  'True
         Width           =   2535
      End
      Begin VB.OptionButton Option2
         Caption         =   "Paste to current sector"
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   540
         Width           =   2055
      End
      Begin VB.OptionButton Option3
         Caption         =   "Paste to end of file"
         Height          =   255
         Left            =   120
         TabIndex        =   3
         Top             =   840
         Width           =   1815
      End
   End
   Begin VB.CommandButton Command1
      Caption         =   "Paste"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   2280
      Width           =   1455
   End
   Begin VB.CommandButton Command2
      Caption         =   "Cancel"
      Height          =   375
      Left            =   3120
      TabIndex        =   0
      Top             =   2280
      Width           =   1455
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim X As Integer
Dim FileNo As Integer
Dim H1 As Integer
Dim H2 As Integer
Dim Z As Long
Dim Y As Byte
Dim Y0 As Integer
Dim Y1 As Integer
Dim Y2 As Integer
Dim T1 As String * 1
Dim T2 As String * 1
Dim LS As String * 1
Dim RS As String * 1
Dim CurrentString As String

Private Sub Command1_Click()
Beep
If CopyString <> "" Then
   If Form1.Text1.Visible = True Then
      Form1.Text1.Text = Left$(CopyString, 2)
      Exit Sub
   End If
   CurrentString = CopyString
   If Option7.Value = True Then
      For X = 0 To 511
          CurrentString = CurrentString + Form1.Label1(X).Caption
      Next X
   End If
   If Option2.Value = True Then
      Y0 = 0
   Else
      Y0 = OldIndex
   End If
   Z = Len(CurrentString) / 2
   Z = Z + Y0 - 1
   If Z > 511 Then
      X = 511
   Else
      X = Z
   End If
   H1 = 1
   For X = Y0 To X
      Form1.Label1(X).Caption = Mid$(CurrentString, H1, 2)
      Form1.Label1(X).BackColor = &HAAFFFF
      Form1.Label1(X).ForeColor = 0
      Form1.Label1(X).Tag = "1"
      LS = Left$(Form1.Label1(X).Caption, 1)
      RS = Right$(Form1.Label1(X).Caption, 1)
      Y1 = Val(LS)
      If Y1 = 0 Then
         If LS <> "0" Then
            Y1 = (Asc(LS) - Asc("A")) + 10
         End If
      End If
      Y2 = Val(RS)
      If Y2 = 0 Then
         If RS <> "0" Then
            Y2 = (Asc(RS) - Asc("A")) + 10
         End If
      End If
      Y0 = (Y1 * 16) + Y2
      Form1.Label6(X).Caption = Chr$(Y0)
      Form1.Label6(X).BackColor = &HAAFFFF
      Form1.Label6(X).ForeColor = &H808080
      H1 = H1 + 2
   Next X
End If
Unload Form3
End Sub

Private Sub Command2_Click()
Unload Form3
End Sub

Project Homepage: