Support Forums

Full Version: {TUT} How to make a File Pumper
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
this is also a good tutorial for beginners.

oke lets get started.

File -> New Project -> Windows Application -> “File Pumper” -> Ok

add the following from your toolbox

Code:
TextBox1
NumericUpDown1
RadioButton1
RadioButton2
Button1
Button2

button 1 : open
button 2 : PUMP

make it look like this.

[Image: 2yn127t.png]

add this code for the open button.

Code:
Dim ofd As New OpenFileDialog
        ofd.Filter = "Exe Files|*.exe"
        ofd.ShowDialog()
        TextBox1.Text = ofd.FileName

and this code for the pump button.

Code:
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!")

if you compress the file .ZIP, .RAR, ect It will go back to the original size.

now you made your own first file pumper Smile
Nice and simple tutorial, only there's already a tutorial about this by BlackSpider. http://www.supportforums.net/showthread.php?tid=5634
(11-01-2010, 01:09 PM)Montana Wrote: [ -> ]Nice and simple tutorial, only there's already a tutorial about this by BlackSpider. http://www.supportforums.net/showthread.php?tid=5634

sorry i wil use the search button next time ;)
Isn't this the tutorial posted by an Indonesian coder on HF?
(11-04-2010, 05:57 AM)Marik™ Wrote: [ -> ]Isn't this the tutorial posted by an Indonesian coder on HF?

its another source.
(11-04-2010, 07:20 AM)the_legend_nl Wrote: [ -> ]its another source.
Really?
It looks the same as Theref's file pumper.
(11-04-2010, 02:22 PM)Marik™ Wrote: [ -> ]Really?
It looks the same as Theref's file pumper.

thats right that was what i was trying to say.