Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
{TUT} How to make a File Pumper
#1
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
[Image: icBx9Y.png]
Reply


Messages In This Thread
{TUT} How to make a File Pumper - by the_legend_nl - 11-01-2010, 09:38 AM
RE: {TUT} How to make a File Pumper - by Marik™ - 11-04-2010, 05:57 AM
RE: {TUT} How to make a File Pumper - by Marik™ - 11-04-2010, 02:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [TUT] How to make a simple WebBrowser in VB 2010! [TUT] - [ Pictures] Statics 95 63,173 10-07-2012, 06:56 AM
Last Post: a99
  [SF Coders] Grabbing an Icon from a File and Saving! [TUT] milopeach 13 3,998 05-15-2012, 06:22 PM
Last Post: OnyxDev
  [TUT]Auto-Update System[TUT] HB Virus 3 2,456 01-07-2012, 02:21 PM
Last Post: Mastermrz
  [TUT]Enable and Disable TaskManger in vb.net [TUT] HB Virus 4 3,251 12-19-2011, 10:10 AM
Last Post: euverve
  [Vb.net] How To Make Your vb.net application nice loocking. [TUT] CodingWorm 3 6,417 10-14-2011, 01:31 AM
Last Post: Digital-Punk

Forum Jump:


Users browsing this thread: 2 Guest(s)