Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Unzipping program
#1
C++ Code
  1. Imports System.IO
  2. Public Class Form1
  3.  
  4. Private Sub KryptonButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click
  5. Using ofd As New OpenFileDialog
  6. ofd.Filter = "ZipFile|*.zip"
  7. If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
  8. Dim file As String = ofd.FileName
  9. Dim cu As New ClassUnzip(file, Path.Combine(Path.GetDirectoryName(file), "test_unzip_folder"))
  10. AddHandler cu.UnzipFinishd, AddressOf Unziped
  11. cu.UnzipNow()
  12. End If
  13. End Using
  14.  
  15. End Sub
  16.  
  17. Private Sub Unziped()
  18. MessageBox.Show("Unzipping finished")
  19. End Sub
  20.  
  21. End Class
  22.  
  23.  
  24. Classe:
  25.  
  26.  
  27. Imports System
  28. Imports System.IO
  29.  
  30. Public Class ClassUnzip
  31.  
  32. Private _file As String
  33. Private _folder As String
  34. Private _towhere As String
  35.  
  36. Private _shell As Shell32.IShellDispatch2
  37.  
  38. ''' <summary></summary>
  39. ''' <remarks></remarks>
  40. Public Event Unzipstart()
  41. ''' <summary></summary>
  42. ''' <remarks></remarks>
  43. Public Event UnzipFinishd()
  44.  
  45. ''' <summary></summary>
  46. ''' <param name="file"></param>
  47. ''' <param name="towhere"></param>
  48. ''' <remarks></remarks>
  49. Public Sub New(ByVal file As String, ByVal towhere As String)
  50. _file = file
  51. _towhere = towhere
  52. _folder = Path.Combine(Path.GetDirectoryName(_file), _towhere)
  53. _shell = CreateObject("Shell.Application")
  54. End Sub
  55.  
  56. ''' <summary></summary>
  57. ''' <returns></returns>
  58. ''' <remarks></remarks>
  59. Public Function UnzipNow() As Boolean
  60.  
  61. If Directory.Exists(_folder) = False Then
  62. Directory.CreateDirectory(_folder)
  63. End If
  64.  
  65. RaiseEvent Unzipstart()
  66.  
  67. Dim temp As Shell32.Folder = _shell.NameSpace((_folder))
  68. If temp IsNot Nothing Then
  69. temp.CopyHere(_shell.NameSpace((_file)).Items)
  70. End If
  71.  
  72. RaiseEvent UnzipFinishd()
  73.  
  74. Return True
  75. End Function
  76.  
  77. ''' <summary></summary>
  78. ''' <value></value>
  79. ''' <returns></returns>
  80. ''' <remarks></remarks>
  81. Public Property UnZipFile() As String
  82. Get
  83. Return _file
  84. End Get
  85. Set(ByVal value As String)
  86. _file = value
  87. End Set
  88. End Property
  89.  
  90. ''' <summary></summary>
  91. ''' <value></value>
  92. ''' <returns></returns>
  93. ''' <remarks></remarks>
  94. Public Property UnzipTo() As String
  95. Get
  96. Return _towhere
  97. End Get
  98. Set(ByVal value As String)
  99. _towhere = value
  100. End Set
  101. End Property
  102.  
  103. End Class
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#2
I didn't know you were smart enough to make something like this.

Good job.
[Image: MaEIQ.png]
Reply

#3
LOLWUT?!!!!!!!!!!!!!!!?!?!?!?!
U SAID IT?!?! MY MAIN HATER SAID "GJ" TO ME?!?!?!?!
I WILL GO FUCK MYSELF Confusedhocked:
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#4
VB suck though





better?
[Image: MaEIQ.png]
Reply

#5
hmm... the phrase u said doesnt look friendly but it took away the feeling of deception)
i work with VB liiiiiiiitle bit. i <3 mapping. SDK & UDK. but it needs no tutorials in text. only in videos =3
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#6
wat?
[Image: MaEIQ.png]
Reply

#7
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply

#8
[Image: MaEIQ.png]
Reply

#9

[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#10
(08-15-2011, 17:23)G-Man Wrote:

Fuck yea! nobody figured out my way yet.
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help what program, open and edit plugins ??? lexa__33 1 2,814 06-24-2013, 09:36
Last Post: EnVi Sweden Rocks
Question Help Data Control program 99IRock 19 10,262 01-15-2013, 22:39
Last Post: 99IRock
  [Request] Designing a Program dylankrajewski 12 7,398 06-13-2012, 23:54
Last Post: House
  awesome RCON program JariZ 6 4,222 05-13-2012, 10:15
Last Post: surtek
  [Release] My first Basic Program dylankrajewski 3 2,898 04-02-2012, 12:51
Last Post: The Clay Man
  Proxy program for school Lemon 13 8,050 03-07-2012, 18:05
Last Post: Lemon
  how do i create a easy program''? alvarogt95 22 10,968 01-25-2012, 03:36
Last Post: Lemon
  Help Can someone tell me which program do you use for creating/editing BO scripts/mods? fiki574_CRO 7 4,403 01-20-2012, 18:38
Last Post: fiki574_CRO
  Help Read Modern Warfare 2 console with a C# program? (AlterIWNet dedicated server) xplosiff 0 2,668 12-24-2011, 12:14
Last Post: xplosiff
  [Awesome Fun] Kerbal Space Program d0h! 2 3,037 10-18-2011, 09:27
Last Post: Agustin

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.