home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "UUCODER.VBX Demo"
- ClientHeight = 4020
- ClientLeft = 1050
- ClientTop = 825
- ClientWidth = 7365
- Height = 4425
- Left = 990
- LinkTopic = "Form1"
- ScaleHeight = 4020
- ScaleWidth = 7365
- Top = 480
- Width = 7485
- Begin Frame Frame1
- Caption = "Events"
- Height = 1935
- Left = 2400
- TabIndex = 12
- Top = 1680
- Width = 4815
- Begin ListBox Events
- Height = 1395
- Left = 120
- TabIndex = 13
- Top = 360
- Width = 4575
- End
- End
- Begin TextBox LinesPerFile
- Height = 375
- Left = 3960
- TabIndex = 5
- Text = "950"
- Top = 960
- Width = 1455
- End
- Begin Frame T
- Caption = "Type"
- Height = 1455
- Left = 240
- TabIndex = 10
- Top = 960
- Width = 1575
- Begin OptionButton opt_Auto
- Caption = "Auto Detect"
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 1080
- Value = -1 'True
- Width = 1335
- End
- Begin OptionButton opt_xx
- Caption = "XX"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 720
- Width = 1335
- End
- Begin OptionButton Opt_UU
- Caption = "UU"
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 360
- Width = 1335
- End
- End
- Begin TextBox OutFile
- Height = 375
- Left = 4560
- TabIndex = 1
- Top = 240
- Width = 2055
- End
- Begin CommandButton cmd_Decode
- Caption = "Decode"
- Height = 495
- Left = 240
- TabIndex = 7
- Top = 3240
- Width = 1575
- End
- Begin UUCoder UUCoder1
- InFile = ""
- Left = 600
- LinesPerFile = 950
- Open = 0 'False
- OutFile = ""
- Result = 0
- Top = 2040
- Type = 2 'AutoDetect
- End
- Begin CommandButton cmd_Encode
- Caption = "Encode"
- Height = 495
- Left = 240
- TabIndex = 6
- Top = 2640
- Width = 1575
- End
- Begin TextBox InFile
- Height = 375
- Left = 1320
- TabIndex = 0
- Top = 240
- Width = 2055
- End
- Begin Label Lin
- Caption = "Lines Per File"
- Height = 255
- Left = 2400
- TabIndex = 11
- Top = 960
- Width = 1335
- End
- Begin Label Label2
- Caption = "OutFile:"
- Height = 255
- Left = 3600
- TabIndex = 9
- Top = 240
- Width = 735
- End
- Begin Label Label1
- Caption = "InFile:"
- Height = 255
- Left = 240
- TabIndex = 8
- Top = 240
- Width = 735
- End
- Option Explicit
- Sub cmd_Decode_Click ()
- Events.Clear
- uucoder1.InFile = Trim$(InFile)
- If Opt_uu.Value = True Then
- uucoder1.Type = 0
- End If
- If Opt_xx.Value = True Then
- uucoder1.Type = 1
- End If
- If Opt_Auto.Value = True Then
- uucoder1.Type = 2
- End If
- uucoder1.Action = 0 ' decode
- Select Case uucoder1.Result
- Case 20000
- MsgBox "Invalid Action specified"
- Case 20001
- MsgBox "Error opening a File"
- Case 20002
- MsgBox "Nothing to do. Input file has no begin"
- Case 20003
- MsgBox "File Decoded OK"
- Case 20004
- MsgBox "File not found"
- Case 20005
- MsgBox "Input file not specified"
- End Select
- End Sub
- Sub cmd_Encode_Click ()
- Events.Clear
- uucoder1.InFile = Trim$(InFile)
- uucoder1.OutFile = Trim$(OutFile)
- uucoder1.LinesPerFile = Val(LinesPerFile)
- If Opt_xx.Value = True Then
- uucoder1.Type = 1
- Else
- uucoder1.Type = 0
- End If
- uucoder1.Action = 1 ' encode
- Select Case uucoder1.Result
- Case 20000
- MsgBox "Invalid Action specified"
- Case 20001
- MsgBox "Error opening a File"
- Case 20002
- MsgBox "Nothing to do"
- Case 20003
- MsgBox "File Encoded OK"
- Case 20004
- MsgBox "File not found"
- Case 20005
- MsgBox "Input file not specified"
- End Select
- End Sub
- Sub UUCoder1_Message (MsgNum As Integer, Msg As String)
- Dim Message As String
- Select Case MsgNum
- Case 1
- Message = "Creating " & Msg
- Case 2
- Message = "Could not find next input file " & Msg & " please suply it by modify Msg"
- Case 3
- Message = "Encoded data to " & Msg
- Case 4
- Message = "Decoing data from " & Msg
- End Select
- Events.AddItem Message
- DoEvents
- End Sub
-