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
#2
Nice and simple tutorial, only there's already a tutorial about this by BlackSpider. http://www.supportforums.net/showthread.php?tid=5634
Reply
#3
(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 ;)
[Image: icBx9Y.png]
Reply
#4
Isn't this the tutorial posted by an Indonesian coder on HF?
Reply
#5
(11-04-2010, 05:57 AM)Marik™ Wrote: Isn't this the tutorial posted by an Indonesian coder on HF?

its another source.
[Image: icBx9Y.png]
Reply
#6
(11-04-2010, 07:20 AM)the_legend_nl Wrote: its another source.
Really?
It looks the same as Theref's file pumper.
Reply
#7
(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.
[Image: icBx9Y.png]
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)