VERSION 5.00
Begin VB.Form frmMain 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   2085
   ClientLeft      =   150
   ClientTop       =   720
   ClientWidth     =   3975
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2085
   ScaleWidth      =   3975
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame2 
      Caption         =   "Clipboard"
      Height          =   1935
      Left            =   1680
      TabIndex        =   5
      Top             =   50
      Width           =   2175
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "Arial Unicode MS"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1550
         Left            =   120
         MultiLine       =   -1  'True
         TabIndex        =   6
         Top             =   240
         Width           =   1935
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Format"
      Height          =   1935
      Left            =   120
      TabIndex        =   0
      Top             =   50
      Width           =   1455
      Begin VB.OptionButton Option1 
         Caption         =   "Text"
         Height          =   195
         Index           =   0
         Left            =   240
         TabIndex        =   4
         Top             =   360
         Value           =   -1  'True
         Width           =   1095
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Hex"
         Height          =   195
         Index           =   1
         Left            =   240
         TabIndex        =   3
         Top             =   720
         Width           =   1095
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Decimal"
         Height          =   195
         Index           =   2
         Left            =   240
         TabIndex        =   2
         Top             =   1080
         Width           =   1095
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Binary"
         Height          =   195
         Index           =   3
         Left            =   240
         TabIndex        =   1
         Top             =   1440
         Width           =   1095
      End
   End
   Begin VB.Menu mnuFile 
      Caption         =   "&File"
      Begin VB.Menu mnuFileExit 
         Caption         =   "E&xit"
      End
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "&Help"
      Begin VB.Menu mnuHelpAbout 
         Caption         =   "&About"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
    If App.PrevInstance = True Then
       MsgBox "Application already running!"
       End
    End If

    Me.Caption = App.Title
    Call SimulateOptionClick
End Sub

Private Sub Form_GotFocus()
    Call SimulateOptionClick
End Sub

Private Sub mnuFileExit_Click()
    End
End Sub

Private Sub Option1_Click(Index As Integer)
    ShowClipboardContents (Index)
End Sub

Private Sub SimulateOptionClick()
    Dim X As Long
    For X = 0 To Option1.UBound
        If Option1(X).Value = True Then
            Call ShowClipboardContents(X)
        End If
    Next
End Sub

Private Sub ShowClipboardContents(ByVal Format As Integer)
    Dim strData As String, strRes As String, strChar As String, strUni As String
    Dim bytArray() As Byte
    Dim X As Long
    
    bytArray = Clipboard.GetText
    'strData = Clipboard.GetText

    Select Case Format
    Case 0  'Text
        strRes = CStr(bytArray)
    Case 1  'Hex
        For X = 0 To UBound(bytArray)
           strRes = strRes & Hex(bytArray(X)) & " "
        Next
        strRes = Replace(strRes, " 0", "")  'There's a 0 between every value for some reason
    Case 2  'Decimal
        For X = 0 To UBound(bytArray)
           strRes = strRes & bytArray(X) & " "
        Next
        strRes = Replace(strRes, " 0", "") 'There's a 48 between every value for some reason
    Case 3  'Binary
        strRes = "Binary is not yet functional..."
    End Select
    
          
    Text1.Text = strRes

End Sub



'    strRes = ""
'    For X = 1 To Len(strData)
        'strChar = Mid(strData, X, 1)
        'strUni = StrConv(strChar, vbFromUnicode)
        'strUni = strChar
        'strRes = strRes & strUni ' & " "
    'Next
