Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


How To Make A File Pumper [VB.NET] filter_list
Author
Message
How To Make A File Pumper [VB.NET] #1
This is a tutorial on how to make a fully working File Pumper!
It is pretty simple and will probable help a lot of you out!

1. Make a new form. Name it "File Pumper" or whatever you prefer.

2. Put the following things in Form1.
1x Textbox
2x Button
2x Radio Button
1x NumericUpDown

3. Set the following text for the following things:
Button1 = Browse
Button2 = Pump!
RadioButton1 = Kilobyte
RadioButton2 = Megabyte

Here is the layout I used, You do not have too of course.
[Image: RjWWb.png]

4. Double click the Open button & add the following code.
Code:
Dim ofd As New OpenFileDialog
        ofd.Filter = "Exe Files|*.exe"
        ofd.ShowDialog()
        TextBox1.Text = ofd.FileName

5. Double click the Pump button & add the following code.
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!")

That is a easy way to make a File Pumper! Enjoy!
[Image: xlbdwZT.png]

Reply

RE: How To Make A File Pumper [VB.NET] #2
While size is lower than selected size, add a byte.
Nice method, thanks for sharing Wink

Reply

RE: How To Make A File Pumper [VB.NET] #3
Thank you, Enjoy! Smile
[Image: xlbdwZT.png]

Reply







Users browsing this thread: 1 Guest(s)