Nov 26, 2009 05:28 PM
(This post was last modified: Nov 26, 2009 05:56 PM by Theref.)
Ok, in this tutorial i will explain you about how to make your own file pumper. What is file pumper? If you have a file that is too small, well you can pump it with this program, so it's size will be changed as you wish.
If you haven't know anything about VB.NET, i recommend you to read this tutorial http://www.vbsources.com/thread-27.html first before proceeding to this tut. Let's get it started,
File -> New Project -> Windows Application -> “File Pumper” -> Ok
Next, we need some components to be added to our form.
And set the components.
Spoiler (Click to View)
Now, double click on the Button2 and put this code
this will show up the file dialog when users click the button2
and put this code for the button1
Congratulations, you've just made your first File Pumper! :)
Please post your feedback here
If you haven't know anything about VB.NET, i recommend you to read this tutorial http://www.vbsources.com/thread-27.html first before proceeding to this tut. Let's get it started,
File -> New Project -> Windows Application -> “File Pumper” -> Ok
Next, we need some components to be added to our form.
[img]http://i49.[censored].com/30scy2d.jpg[/img]
TextBox1
NumericUpDown1
RadioButton1
RadioButton2
Button1
Button2
TextBox1
NumericUpDown1
RadioButton1
RadioButton2
Button1
Button2
So, it will be looks like this
[img]http://i49.[censored].com/ei3t69.jpg[/img]
And set the components.
Spoiler (Click to View)
Now, double click on the Button2 and put this code
Code
Dim ofd As New OpenFileDialog
ofd.Filter = "Exe Files|*.exe"
ofd.ShowDialog()
TextBox1.Text = ofd.FileNameand put this code for the button1
Code
Dim sfd As New SaveFileDialog
sfd.Filter = "Exe Files|*.exe"
sfd.ShowDialog()
Dim filesize As Double = Val(NumericUpDown1.Value)
IO.File.Copy(TextBox1.Text, sfd.FileName)
If RadioButton1.Checked Then
filesize = filesize * 1024
End If
If RadioButton2.Checked Then
filesize = filesize * 1048576
End If
Dim filetopump = IO.File.OpenWrite(sfd.FileName)
Dim size = filetopump.Seek(0, IO.SeekOrigin.[End])
While size < filesize
filetopump.WriteByte(0)
size += 1
End While
filetopump.Close()
MsgBox("Successfully Pumped!")(Nov 26, 2009 09:43 AM)Omniscient Wrote: Remember, if you compress the file (.ZIP, .RAR, ect) It will shrink back to it's original size.
Congratulations, you've just made your first File Pumper! :)
Please post your feedback here



