Written some cool source code? Upload it to Programmer's Heaven.

View \fsplit1.frm

File Splitter in C and VB - C/VB source included v1.0

Submitted By: gogizmo
Rating: (Not rated) (Rate It)


VERSION 5.00
Begin VB.Form Form1
   BorderStyle     =   1  'Fixed Single
   Caption         =   "FILE SPLITTER"
   ClientHeight    =   6735
   ClientLeft      =   3210
   ClientTop       =   1005
   ClientWidth     =   5655
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6735
   ScaleWidth      =   5655
   Begin VB.Frame Frame1
      Caption         =   "FILE SPLITTER"
      BeginProperty Font
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   6735
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   5655
      Begin VB.CommandButton cmdAbout
         Caption         =   "About"
         Height          =   855
         Left            =   4320
         TabIndex        =   9
         Top             =   2640
         Width           =   1095
      End
      Begin VB.CommandButton cmdExit
         Caption         =   "Exit"
         Height          =   855
         Left            =   3000
         TabIndex        =   8
         Top             =   2640
         Width           =   1215
      End
      Begin VB.CommandButton cmdCut
         Caption         =   "GO!"
         Height          =   855
         Left            =   3000
         TabIndex        =   7
         Top             =   1680
         Width           =   2415
      End
      Begin VB.TextBox Cutl
         BeginProperty Font
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3000
         TabIndex        =   6
         Text            =   "1"
         Top             =   1200
         Width           =   2415
      End
      Begin VB.DirListBox spath
         Height          =   2565
         Left            =   240
         TabIndex        =   4
         Top             =   960
         Width           =   2535
      End
      Begin VB.FileListBox sname
         Height          =   2820
         Left            =   240
         TabIndex        =   3
         Top             =   3720
         Width           =   5175
      End
      Begin VB.DriveListBox Drive1
         Height          =   315
         Left            =   240
         TabIndex        =   2
         Top             =   600
         Width           =   2535
      End
      Begin VB.Label Label4
         Caption         =   "(In BYTES)"
         Height          =   255
         Left            =   3000
         TabIndex        =   10
         Top             =   840
         Width           =   1935
      End
      Begin VB.Label Label3
         Caption         =   "Enter Size Of Output Files :"
         Height          =   255
         Left            =   3000
         TabIndex        =   5
         Top             =   600
         Width           =   2055
      End
      Begin VB.Label Label1
         Caption         =   "Choose File To Split :"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   2415
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAbout_Click()

Form2.Visible = True

End Sub

Private Sub cmdCut_Click()
Dim X
Dim strfname

On Error GoTo err_hndl

If Cutl.Text = "" Then
   
    MsgBox "Wrong Output File Length !", vbCritical, "ERROR"
    Exit Sub

End If

If Cutl.Text < 1 Then
    MsgBox "Wrong Output File Length !", vbCritical, "ERROR"
    Exit Sub
End If

FileCopy spath.Path & "\" & sname.FileName, App.Path & "\" & sname.FileName

X = Shell(App.Path & "\" & "myfcut1.exe " & (Cutl.Text) & " " & sname.FileName, vbHide)

Kill App.Path & "\" & sname.FileName

MsgBox "A 'Batch' (.BAT) file has been created in the destination folder !", vbInformation, "FILE SPLITTER"

Exit Sub

err_hndl:

X = Shell("myfcut1.exe " & (Cutl.Text) & " " & sname.FileName, vbHide)

MsgBox "A 'Batch' (.BAT) file has been created in the destination folder !", vbInformation, "FILE SPLITTER"

End Sub

Private Sub cmdExit_Click()
End
End Sub

Private Sub Drive1_Change()
spath.Path = Drive1.Drive

End Sub

Private Sub spath_Change()
sname.Path = spath.Path

End Sub

corner
© 1996-2008. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin.
bootstrapLabs Logo A bootstrapLabs project.