Support Forums
{TUT} How to make a File Pumper - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: {TUT} How to make a File Pumper (/showthread.php?tid=13361)



{TUT} How to make a File Pumper - the_legend_nl - 11-01-2010

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



RE: {TUT} How to make a File Pumper - Montana" - 11-01-2010

Nice and simple tutorial, only there's already a tutorial about this by BlackSpider. http://www.supportforums.net/showthread.php?tid=5634


RE: {TUT} How to make a File Pumper - the_legend_nl - 11-01-2010

(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 ;)


RE: {TUT} How to make a File Pumper - Marik™ - 11-04-2010

Isn't this the tutorial posted by an Indonesian coder on HF?


RE: {TUT} How to make a File Pumper - the_legend_nl - 11-04-2010

(11-04-2010, 05:57 AM)Marik™ Wrote: Isn't this the tutorial posted by an Indonesian coder on HF?

its another source.


RE: {TUT} How to make a File Pumper - Marik™ - 11-04-2010

(11-04-2010, 07:20 AM)the_legend_nl Wrote: its another source.
Really?
It looks the same as Theref's file pumper.


RE: {TUT} How to make a File Pumper - the_legend_nl - 11-05-2010

(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.