Results 1 to 15 of 15
  1. #1
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108

    [Tutorial]Unzipping with VB.Net

    I'm going to explain you guys, how to unzip .rar/.zip/.7z and so on with visual basic.

    We first off need the SharpZibLibrary, which can be found in attachments.

    After downloading it SharpZipLib_0855_Bin.zip, unrar it. Now start a new vb project.



    Now add the .dll to your project.

    Solution-Explorer > Righ***1ck on your project > Add Reference > Browse > Select the .dll from the "net-20" folder.





    Add the following namespace

    Code:
    Imports ICSharpCode.SharpZipLib
    Make 1 Textbox and 2 Buttons.

    Textbox1 = Path to the folder where the archive is in
    Button1 = FolderBrowserDialog to browse the archive
    Button2 = Unzipping the archive

    Set the openfiledialog...

    On button1_click event...

    Code:
    Dim fbd as folderbrowserdialog
    fbd.showdialog
    textbox1.text = fbd.selectedpath
    On button2_click event...

    Declare a fastzip

    Code:
    Dim unz as zip.fastzip()
    Now to unzip something...

    Code:
    unzip.ExtractZip("ZipDirectory", "targetdirectory", "filefilter")

    Let's say we want to save it to the desktop...

    Code:
    Dim desktop as string
    on Form_Load

    Code:
    desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) ' getting desktop path of any computer
    In our case it is...

    Code:
    unz.ExtractZip(Textbox1.text & "\Filename"", desktop & "\Foldername"", "")
    To set the filename / Desktop directory you can do the following...

    Code:
    Dim directory As String = System.IO.Path.Combine(desktop, "Foldername to save it to")
    
                Dim file As String = System.IO.Path.Combine(textbox1.Text, "foldernametounzip.zip")
    -> ->

    Code:
    unz.ExtractZip(file, directory, "")
    This might be a bit confusing, I am currently confusing myself lul...here is how it should look like...

    Code:
    Imports ICSharpCode.SharpZipLib
    Public Class Form1
        Dim desktop As String
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim fbd As New FolderBrowserDialog
            fbd.ShowDialog()
            filepath.Text = fbd.SelectedPath
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            Try
    
                Dim directory As String = System.IO.Path.Combine(desktop, "Foldername to save it in")
    
                Dim file As String = System.IO.Path.Combine(filepath.Text, "FileToUnzip.zip")
    
                Dim unz As New Zip.FastZip()
                unz.ExtractZip(file, directory, "")
    
            Catch
                MsgBox(ErrorToString)
            End Try
        End Sub
    
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
        End Sub
    End Class

    You sure can do a lot with the sharpzip library, not just unzipping. I hope you did understand me ^.-



  2. The Following 11 Users Say Thank You to Blubb1337 For This Useful Post:

    CAFlames (04-20-2010),CaptainHacking (08-14-2014),Cryptonic (07-13-2011),H4CK3R C4BR (05-02-2012),Infahh (07-06-2015),MJLover (03-20-2010),NextGen1 (03-20-2010),trevor206 (05-03-2010),XGelite (03-22-2010),Zoom (03-20-2010),[GER]Black_Ops (01-03-2016)

  3. #2
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Good job, easy to follow.
    1+
    -Rest in peace leechers-

    Your PM box is 100% full.

  4. #3
    MJLover's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Neverland
    Posts
    759
    Reputation
    33
    Thanks
    110
    My Mood
    Cheerful
    Very Nice. Thanks for sharing

  5. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Looks good, thanks for sharing

    Nice Sig Hej


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. #5
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    this is good for updaters, since servers do not allow uploads of exes that can be downloaded...


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  7. #6
    AeroMan's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Hell
    Posts
    3,294
    Reputation
    189
    Thanks
    3,049
    My Mood
    Busy
    nice release man,good tut!

  8. #7
    scimmyboy's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    https://mpgh.net MPGHCash: $442,596,199
    Posts
    5,645
    Reputation
    26
    Thanks
    896
    My Mood
    Happy
    i like the foreign language. -.-

  9. #8
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Vb.net is universal


     


     


     



    The Most complete application MPGH will ever offer - 68%




  10. #9
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    Nice Tutorial.

    if i was still using Vb.net then this would have come in handy........

  11. #10
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by XGelite View Post
    Nice Tutorial.

    if i was still using Vb.net then this would have come in handy........
    what are you using nao?



  12. #11
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    Quote Originally Posted by Blubb1337 View Post
    what are you using nao?
    C#.
    way better for game.
    VB is unfortunately really no good for that.

  13. #12
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    On what kind of game are you currently working on?

    Any specific ideas yet? Concept :P?

    (Just curious)



  14. #13
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    Quote Originally Posted by Blubb1337 View Post
    On what kind of game are you currently working on?

    Any specific ideas yet? Concept :P?

    (Just curious)

    Well thats what im trying to figure out. Its going to be 3rd person more than likely. Its going to be sort-of like Zelda. That style. i guess you could call it RPG.
    Im still trying to come up with a storyline for it. I dont even have a name for it yet.
    Thinking of doing a jungle + urban after an earthquake type of environment/setting. Going to be for pc and xbox. Dont expect any jaw dropping graphics and animation lol

  15. #14
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    wery nice relase my friend!!!! +1

  16. #15
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Closed, Month Old Bump >.<


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. Batch Tutorial! - Mess With Your Friends
    By Haites in forum General Game Hacking
    Replies: 6
    Last Post: 04-29-2008, 09:49 AM
  2. what happend with MPGH.net man...
    By GhostLife in forum WarRock - International Hacks
    Replies: 16
    Last Post: 01-15-2008, 09:26 AM
  3. [Tutorial] How to VB.Net your trainer
    By dezer in forum WarRock - International Hacks
    Replies: 10
    Last Post: 07-16-2007, 10:28 PM
  4. [TUTORIAL]how to VB.net 2005 Trainers (Incl. secure passwords)
    By kyo in forum WarRock - International Hacks
    Replies: 20
    Last Post: 07-06-2007, 09:42 PM
  5. [Tutorial]Working with cheatengine these days
    By System79 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 09-06-2006, 11:48 PM