Peter Gill - 2010-02-06

First I want to say this is a great program and I use it often.

I have a patch for frmMain.Designer.vb and frmMain.vb.  It adds click events to the menu items for adding 7zip files and loading and saving a configuration file.

I also added double quotes around the resource hacker argument string.  Without this resource hacker would always crash.

One last change I made was to save/load the icon resource based on the application startup path instead using the full path when saving so the config file is portable between computers.

As I do not see anywhere else on this project to send/upload patches I am posting here. 

-- C:/Users/Peter_2/Downloads/7-ZIP SFX Maker/frmMain.Designer.vb Thu Oct 22 05:51:34 2009
+++ C:/Users/Peter_2/Documents/Projects/misc/7-ZIP SFX Maker/frmMain.Designer.vb Sat Feb 06 13:45:51 2010
@@ -47,11 +47,11 @@
         Me.cmdSaveSettings = New System.Windows.Forms.Button
         Me.imgl36 = New System.Windows.Forms.ImageList(Me.components)
         Me.cmdMakeSFX = New System.Windows.Forms.Button
+        Me.prgMain = New Framework.Controls.XpProgressBar
         Me.cmdLoadSettings = New System.Windows.Forms.Button
         Me.tcMain = New System.Windows.Forms.TabControl
         Me.tabFiles = New System.Windows.Forms.TabPage
         Me.txtFiles = New System.Windows.Forms.TextBox
-        Me.prgMain = New Framework.Controls.XpProgressBar
         Me.lstFiles = New System.Windows.Forms.ListBox
         Me.cmdFilesAdd = New System.Windows.Forms.Button
         Me.imgl40 = New System.Windows.Forms.ImageList(Me.components)
@@ -59,20 +59,23 @@
         Me.cmdFilesClear = New System.Windows.Forms.Button
         Me.tabGeneral = New System.Windows.Forms.TabPage
         Me.grpPath = New System.Windows.Forms.GroupBox
+        Me.FlowLayoutPanel3 = New System.Windows.Forms.FlowLayoutPanel
+        Me.optTemp = New System.Windows.Forms.RadioButton
+        Me.optInstallPath = New System.Windows.Forms.RadioButton
         Me.txtInstallPath = New System.Windows.Forms.TextBox
         Me.cmVar = New System.Windows.Forms.ContextMenuStrip(Me.components)
-        Me.optInstallPath = New System.Windows.Forms.RadioButton
-        Me.optTemp = New System.Windows.Forms.RadioButton
         Me.chkAllowPathEdit = New System.Windows.Forms.CheckBox
         Me.grpOverwrite = New System.Windows.Forms.GroupBox
+        Me.FlowLayoutPanel5 = New System.Windows.Forms.FlowLayoutPanel
         Me.optOverwriteOld = New System.Windows.Forms.RadioButton
-        Me.optOverwriteNone = New System.Windows.Forms.RadioButton
         Me.optOverwriteAll = New System.Windows.Forms.RadioButton
+        Me.optOverwriteNone = New System.Windows.Forms.RadioButton
         Me.GroupBox3 = New System.Windows.Forms.GroupBox
-        Me.chkCompressStub = New System.Windows.Forms.CheckBox
-        Me.chkXPStyle = New System.Windows.Forms.CheckBox
+        Me.FlowLayoutPanel7 = New System.Windows.Forms.FlowLayoutPanel
         Me.chkSilent = New System.Windows.Forms.CheckBox
         Me.chkSelfDelete = New System.Windows.Forms.CheckBox
+        Me.chkXPStyle = New System.Windows.Forms.CheckBox
+        Me.chkCompressStub = New System.Windows.Forms.CheckBox
         Me.tabText = New System.Windows.Forms.TabPage
         Me.grpText = New System.Windows.Forms.GroupBox
         Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel
@@ -128,16 +131,16 @@
         Me.dlgSaveSettings = New System.Windows.Forms.SaveFileDialog
         Me.dlgLoadSettings = New System.Windows.Forms.OpenFileDialog
         Me.dlgGUIFont = New System.Windows.Forms.FontDialog
-        Me.FlowLayoutPanel3 = New System.Windows.Forms.FlowLayoutPanel
-        Me.FlowLayoutPanel5 = New System.Windows.Forms.FlowLayoutPanel
-        Me.FlowLayoutPanel7 = New System.Windows.Forms.FlowLayoutPanel
         Me.pForm.SuspendLayout()
         Me.tcMain.SuspendLayout()
         Me.tabFiles.SuspendLayout()
         Me.tabGeneral.SuspendLayout()
         Me.grpPath.SuspendLayout()
+        Me.FlowLayoutPanel3.SuspendLayout()
         Me.grpOverwrite.SuspendLayout()
+        Me.FlowLayoutPanel5.SuspendLayout()
         Me.GroupBox3.SuspendLayout()
+        Me.FlowLayoutPanel7.SuspendLayout()
         Me.tabText.SuspendLayout()
         Me.grpText.SuspendLayout()
         Me.TableLayoutPanel1.SuspendLayout()
@@ -153,9 +156,6 @@
         Me.tabVariables.SuspendLayout()
         Me.tabAbout.SuspendLayout()
         Me.MenuStrip1.SuspendLayout()
-        Me.FlowLayoutPanel3.SuspendLayout()
-        Me.FlowLayoutPanel5.SuspendLayout()
-        Me.FlowLayoutPanel7.SuspendLayout()
         Me.SuspendLayout()
         '
         'pForm
@@ -201,6 +201,25 @@
         Me.cmdMakeSFX.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
         Me.cmdMakeSFX.UseVisualStyleBackColor = True
         '
+        'prgMain
+        '
+        Me.prgMain.ColorBackGround = System.Drawing.Color.White
+        Me.prgMain.ColorBarBorder = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(192, Byte), Integer))
+        Me.prgMain.ColorBarCenter = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
+        Me.prgMain.ColorText = System.Drawing.Color.White
+        Me.prgMain.Font = New System.Drawing.Font("Lucida Sans Unicode", 10.2!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+        Me.prgMain.GradientStyle = Framework.Controls.GradientMode.Vertical
+        Me.prgMain.Location = New System.Drawing.Point(7, 364)
+        Me.prgMain.Name = "prgMain"
+        Me.prgMain.Position = 0
+        Me.prgMain.PositionMax = 100
+        Me.prgMain.PositionMin = 0
+        Me.prgMain.Size = New System.Drawing.Size(532, 33)
+        Me.prgMain.SteepDistance = CType(0, Byte)
+        Me.prgMain.SteepWidth = CType(2, Byte)
+        Me.prgMain.TabIndex = 56
+        Me.prgMain.TextShadowAlpha = CType(100, Byte)
+        '
         'cmdLoadSettings
         '
         Me.cmdLoadSettings.ImageKey = "document-open.png"
@@ -238,7 +257,7 @@
         Me.tabFiles.Location = New System.Drawing.Point(4, 22)
         Me.tabFiles.Name = "tabFiles"
         Me.tabFiles.Padding = New System.Windows.Forms.Padding(3)
-        Me.tabFiles.Size = New System.Drawing.Size(530, 338)
+        Me.tabFiles.Size = New System.Drawing.Size(530, 295)
         Me.tabFiles.TabIndex = 7
         Me.tabFiles.Text = "Files"
         Me.tabFiles.UseVisualStyleBackColor = True
@@ -256,25 +275,6 @@
             "will be saved as Example.sfx.exe. Existing files with the same name will be over" & _
             "written."
         '
-        'prgMain
-        '
-        Me.prgMain.ColorBackGround = System.Drawing.Color.White
-        Me.prgMain.ColorBarBorder = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(192, Byte), Integer))
-        Me.prgMain.ColorBarCenter = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
-        Me.prgMain.ColorText = System.Drawing.Color.White
-        Me.prgMain.Font = New System.Drawing.Font("Lucida Sans Unicode", 10.2!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
-        Me.prgMain.GradientStyle = Framework.Controls.GradientMode.Vertical
-        Me.prgMain.Location = New System.Drawing.Point(7, 364)
-        Me.prgMain.Name = "prgMain"
-        Me.prgMain.Position = 0
-        Me.prgMain.PositionMax = 100
-        Me.prgMain.PositionMin = 0
-        Me.prgMain.Size = New System.Drawing.Size(532, 33)
-        Me.prgMain.SteepDistance = CType(0, Byte)
-        Me.prgMain.SteepWidth = CType(2, Byte)
-        Me.prgMain.TabIndex = 56
-        Me.prgMain.TextShadowAlpha = CType(100, Byte)
-        '
         'lstFiles
         '
         Me.lstFiles.FormattingEnabled = True
@@ -346,19 +346,27 @@
         Me.grpPath.TabStop = False
         Me.grpPath.Text = "Extraction Path"
         '
-        'txtInstallPath
+        'FlowLayoutPanel3
         '
-        Me.txtInstallPath.ContextMenuStrip = Me.cmVar
-        Me.txtInstallPath.Location = New System.Drawing.Point(3, 49)
-        Me.txtInstallPath.Name = "txtInstallPath"
-        Me.txtInstallPath.Size = New System.Drawing.Size(261, 21)
-        Me.txtInstallPath.TabIndex = 19
-        Me.txtInstallPath.Text = "C:\NewFolder"
+        Me.FlowLayoutPanel3.Controls.Add(Me.optTemp)
+        Me.FlowLayoutPanel3.Controls.Add(Me.optInstallPath)
+        Me.FlowLayoutPanel3.Controls.Add(Me.txtInstallPath)
+        Me.FlowLayoutPanel3.Controls.Add(Me.chkAllowPathEdit)
+        Me.FlowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
+        Me.FlowLayoutPanel3.Location = New System.Drawing.Point(10, 20)
+        Me.FlowLayoutPanel3.Name = "FlowLayoutPanel3"
+        Me.FlowLayoutPanel3.Size = New System.Drawing.Size(281, 104)
+        Me.FlowLayoutPanel3.TabIndex = 89
         '
-        'cmVar
+        'optTemp
         '
-        Me.cmVar.Name = "cmVar"
-        Me.cmVar.Size = New System.Drawing.Size(61, 4)
+        Me.optTemp.AutoSize = True
+        Me.optTemp.Location = New System.Drawing.Point(3, 3)
+        Me.optTemp.Name = "optTemp"
+        Me.optTemp.Size = New System.Drawing.Size(181, 17)
+        Me.optTemp.TabIndex = 17
+        Me.optTemp.Text = "Extract to temporary folder"
+        Me.optTemp.UseVisualStyleBackColor = True
         '
         'optInstallPath
         '
@@ -372,15 +380,19 @@
         Me.optInstallPath.Text = "Extract to specified folder"
         Me.optInstallPath.UseVisualStyleBackColor = True
         '
-        'optTemp
+        'txtInstallPath
         '
-        Me.optTemp.AutoSize = True
-        Me.optTemp.Location = New System.Drawing.Point(3, 3)
-        Me.optTemp.Name = "optTemp"
-        Me.optTemp.Size = New System.Drawing.Size(181, 17)
-        Me.optTemp.TabIndex = 17
-        Me.optTemp.Text = "Extract to temporary folder"
-        Me.optTemp.UseVisualStyleBackColor = True
+        Me.txtInstallPath.ContextMenuStrip = Me.cmVar
+        Me.txtInstallPath.Location = New System.Drawing.Point(3, 49)
+        Me.txtInstallPath.Name = "txtInstallPath"
+        Me.txtInstallPath.Size = New System.Drawing.Size(261, 21)
+        Me.txtInstallPath.TabIndex = 19
+        Me.txtInstallPath.Text = "C:\NewFolder"
+        '
+        'cmVar
+        '
+        Me.cmVar.Name = "cmVar"
+        Me.cmVar.Size = New System.Drawing.Size(61, 4)
         '
         'chkAllowPathEdit
         '
@@ -404,6 +416,17 @@
         Me.grpOverwrite.TabStop = False
         Me.grpOverwrite.Text = "Overwrite Mode"
         '
+        'FlowLayoutPanel5
+        '
+        Me.FlowLayoutPanel5.Controls.Add(Me.optOverwriteOld)
+        Me.FlowLayoutPanel5.Controls.Add(Me.optOverwriteAll)
+        Me.FlowLayoutPanel5.Controls.Add(Me.optOverwriteNone)
+        Me.FlowLayoutPanel5.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
+        Me.FlowLayoutPanel5.Location = New System.Drawing.Point(10, 20)
+        Me.FlowLayoutPanel5.Name = "FlowLayoutPanel5"
+        Me.FlowLayoutPanel5.Size = New System.Drawing.Size(178, 103)
+        Me.FlowLayoutPanel5.TabIndex = 90
+        '
         'optOverwriteOld
         '
         Me.optOverwriteOld.AutoSize = True
@@ -414,16 +437,6 @@
         Me.optOverwriteOld.Text = "Overwrite older files"
         Me.optOverwriteOld.UseVisualStyleBackColor = True
         '
-        'optOverwriteNone
-        '
-        Me.optOverwriteNone.AutoSize = True
-        Me.optOverwriteNone.Location = New System.Drawing.Point(3, 49)
-        Me.optOverwriteNone.Name = "optOverwriteNone"
-        Me.optOverwriteNone.Size = New System.Drawing.Size(121, 17)
-        Me.optOverwriteNone.TabIndex = 21
-        Me.optOverwriteNone.Text = "Do not overwrite"
-        Me.optOverwriteNone.UseVisualStyleBackColor = True
-        '
         'optOverwriteAll
         '
         Me.optOverwriteAll.AutoSize = True
@@ -436,6 +449,16 @@
         Me.optOverwriteAll.Text = "Overwrite all files"
         Me.optOverwriteAll.UseVisualStyleBackColor = True
         '
+        'optOverwriteNone
+        '
+        Me.optOverwriteNone.AutoSize = True
+        Me.optOverwriteNone.Location = New System.Drawing.Point(3, 49)
+        Me.optOverwriteNone.Name = "optOverwriteNone"
+        Me.optOverwriteNone.Size = New System.Drawing.Size(121, 17)
+        Me.optOverwriteNone.TabIndex = 21
+        Me.optOverwriteNone.Text = "Do not overwrite"
+        Me.optOverwriteNone.UseVisualStyleBackColor = True
+        '
         'GroupBox3
         '
         Me.GroupBox3.Controls.Add(Me.FlowLayoutPanel7)
@@ -446,29 +469,17 @@
         Me.GroupBox3.TabStop = False
         Me.GroupBox3.Text = "More Options"
         '
-        'chkCompressStub
-        '
-        Me.chkCompressStub.AutoSize = True
-        Me.chkCompressStub.Checked = True
-        Me.chkCompressStub.CheckState = System.Windows.Forms.CheckState.Checked
-        Me.chkCompressStub.Location = New System.Drawing.Point(3, 72)
-        Me.chkCompressStub.Name = "chkCompressStub"
-        Me.chkCompressStub.Size = New System.Drawing.Size(192, 17)
-        Me.chkCompressStub.TabIndex = 4
-        Me.chkCompressStub.Text = "Compress SFX stub with UPX"
-        Me.chkCompressStub.UseVisualStyleBackColor = True
-        '
-        'chkXPStyle
+        'FlowLayoutPanel7
         '
-        Me.chkXPStyle.AutoSize = True
-        Me.chkXPStyle.Checked = True
-        Me.chkXPStyle.CheckState = System.Windows.Forms.CheckState.Checked
-        Me.chkXPStyle.Location = New System.Drawing.Point(3, 49)
-        Me.chkXPStyle.Name = "chkXPStyle"
-        Me.chkXPStyle.Size = New System.Drawing.Size(105, 17)
-        Me.chkXPStyle.TabIndex = 3
-        Me.chkXPStyle.Text = "Use XP Styles"
-        Me.chkXPStyle.UseVisualStyleBackColor = True
+        Me.FlowLayoutPanel7.Controls.Add(Me.chkSilent)
+        Me.FlowLayoutPanel7.Controls.Add(Me.chkSelfDelete)
+        Me.FlowLayoutPanel7.Controls.Add(Me.chkXPStyle)
+        Me.FlowLayoutPanel7.Controls.Add(Me.chkCompressStub)
+        Me.FlowLayoutPanel7.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
+        Me.FlowLayoutPanel7.Location = New System.Drawing.Point(10, 20)
+        Me.FlowLayoutPanel7.Name = "FlowLayoutPanel7"
+        Me.FlowLayoutPanel7.Size = New System.Drawing.Size(483, 107)
+        Me.FlowLayoutPanel7.TabIndex = 90
         '
         'chkSilent
         '
@@ -490,6 +501,30 @@
         Me.chkSelfDelete.Text = "Delete SFX file after extraction (self-delete)"
         Me.chkSelfDelete.UseVisualStyleBackColor = True
         '
+        'chkXPStyle
+        '
+        Me.chkXPStyle.AutoSize = True
+        Me.chkXPStyle.Checked = True
+        Me.chkXPStyle.CheckState = System.Windows.Forms.CheckState.Checked
+        Me.chkXPStyle.Location = New System.Drawing.Point(3, 49)
+        Me.chkXPStyle.Name = "chkXPStyle"
+        Me.chkXPStyle.Size = New System.Drawing.Size(105, 17)
+        Me.chkXPStyle.TabIndex = 3
+        Me.chkXPStyle.Text = "Use XP Styles"
+        Me.chkXPStyle.UseVisualStyleBackColor = True
+        '
+        'chkCompressStub
+        '
+        Me.chkCompressStub.AutoSize = True
+        Me.chkCompressStub.Checked = True
+        Me.chkCompressStub.CheckState = System.Windows.Forms.CheckState.Checked
+        Me.chkCompressStub.Location = New System.Drawing.Point(3, 72)
+        Me.chkCompressStub.Name = "chkCompressStub"
+        Me.chkCompressStub.Size = New System.Drawing.Size(192, 17)
+        Me.chkCompressStub.TabIndex = 4
+        Me.chkCompressStub.Text = "Compress SFX stub with UPX"
+        Me.chkCompressStub.UseVisualStyleBackColor = True
+        '
         'tabText
         '
         Me.tabText.Controls.Add(Me.grpText)
@@ -990,7 +1025,7 @@
         'tsGUIFont
         '
         Me.tsGUIFont.Name = "tsGUIFont"
-        Me.tsGUIFont.Size = New System.Drawing.Size(152, 22)
+        Me.tsGUIFont.Size = New System.Drawing.Size(129, 22)
         Me.tsGUIFont.Text = "GUI Font…"
         '
         'tsLang
@@ -1014,41 +1049,6 @@
         Me.dlgLoadSettings.DefaultExt = "xml"
         Me.dlgLoadSettings.Filter = "XML Document (*.xml)|*.xml"
         '
-        'FlowLayoutPanel3
-        '
-        Me.FlowLayoutPanel3.Controls.Add(Me.optTemp)
-        Me.FlowLayoutPanel3.Controls.Add(Me.optInstallPath)
-        Me.FlowLayoutPanel3.Controls.Add(Me.txtInstallPath)
-        Me.FlowLayoutPanel3.Controls.Add(Me.chkAllowPathEdit)
-        Me.FlowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
-        Me.FlowLayoutPanel3.Location = New System.Drawing.Point(10, 20)
-        Me.FlowLayoutPanel3.Name = "FlowLayoutPanel3"
-        Me.FlowLayoutPanel3.Size = New System.Drawing.Size(281, 104)
-        Me.FlowLayoutPanel3.TabIndex = 89
-        '
-        'FlowLayoutPanel5
-        '
-        Me.FlowLayoutPanel5.Controls.Add(Me.optOverwriteOld)
-        Me.FlowLayoutPanel5.Controls.Add(Me.optOverwriteAll)
-        Me.FlowLayoutPanel5.Controls.Add(Me.optOverwriteNone)
-        Me.FlowLayoutPanel5.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
-        Me.FlowLayoutPanel5.Location = New System.Drawing.Point(10, 20)
-        Me.FlowLayoutPanel5.Name = "FlowLayoutPanel5"
-        Me.FlowLayoutPanel5.Size = New System.Drawing.Size(178, 103)
-        Me.FlowLayoutPanel5.TabIndex = 90
-        '
-        'FlowLayoutPanel7
-        '
-        Me.FlowLayoutPanel7.Controls.Add(Me.chkSilent)
-        Me.FlowLayoutPanel7.Controls.Add(Me.chkSelfDelete)
-        Me.FlowLayoutPanel7.Controls.Add(Me.chkXPStyle)
-        Me.FlowLayoutPanel7.Controls.Add(Me.chkCompressStub)
-        Me.FlowLayoutPanel7.FlowDirection = System.Windows.Forms.FlowDirection.TopDown
-        Me.FlowLayoutPanel7.Location = New System.Drawing.Point(10, 20)
-        Me.FlowLayoutPanel7.Name = "FlowLayoutPanel7"
-        Me.FlowLayoutPanel7.Size = New System.Drawing.Size(483, 107)
-        Me.FlowLayoutPanel7.TabIndex = 90
-        '
         'frmMain
         '
         Me.AllowDrop = True
@@ -1069,8 +1069,14 @@
         Me.tabFiles.PerformLayout()
         Me.tabGeneral.ResumeLayout(False)
         Me.grpPath.ResumeLayout(False)
+        Me.FlowLayoutPanel3.ResumeLayout(False)
+        Me.FlowLayoutPanel3.PerformLayout()
         Me.grpOverwrite.ResumeLayout(False)
+        Me.FlowLayoutPanel5.ResumeLayout(False)
+        Me.FlowLayoutPanel5.PerformLayout()
         Me.GroupBox3.ResumeLayout(False)
+        Me.FlowLayoutPanel7.ResumeLayout(False)
+        Me.FlowLayoutPanel7.PerformLayout()
         Me.tabText.ResumeLayout(False)
         Me.grpText.ResumeLayout(False)
         Me.TableLayoutPanel1.ResumeLayout(False)
@@ -1090,12 +1096,6 @@
         Me.tabAbout.ResumeLayout(False)
         Me.MenuStrip1.ResumeLayout(False)
         Me.MenuStrip1.PerformLayout()
-        Me.FlowLayoutPanel3.ResumeLayout(False)
-        Me.FlowLayoutPanel3.PerformLayout()
-        Me.FlowLayoutPanel5.ResumeLayout(False)
-        Me.FlowLayoutPanel5.PerformLayout()
-        Me.FlowLayoutPanel7.ResumeLayout(False)
-        Me.FlowLayoutPanel7.PerformLayout()
         Me.ResumeLayout(False)

     End Sub

-- C:/Users/Peter_2/Downloads/7-ZIP SFX Maker/frmMain.vb Thu Oct 22 05:52:39 2009
+++ C:/Users/Peter_2/Documents/Projects/misc/7-ZIP SFX Maker/frmMain.vb Sat Feb 06 15:45:33 2010
@@ -434,11 +434,16 @@
         If ResHack <> "" Then
             'replace icon ------------

-            s += " -addoverwrite "
-            s += """" & stub_old & """"
-            s += ",""" & stub_temp & """"
-            s += ",""" & selected_icon & """"
-            s += ", ICONGROUP, 101,"
+            s &= " -addoverwrite "
+            s &= """"
+            s &= """" & stub_old & """"
+            s &= ",""" & stub_temp & """"
+            s &= ",""" & selected_icon & """"
+            s &= ", ICONGROUP, 101,"
+            s &= """"
+
+
+

             proc.StartInfo.FileName = ResHack
             proc.StartInfo.Arguments = s
@@ -449,7 +454,8 @@
             Do Until (proc.HasExited)
                 My.Application.DoEvents()
             Loop
-        Else
+        End If
+        If System.IO.File.Exists(stub_temp) = False Then
             My.Computer.FileSystem.CopyFile(stub_old, stub_temp)
         End If

@@ -679,7 +685,8 @@
             MakeXmlNode(general, "ExtractPathText", Me.txtExtractPathText.Text)
             MakeXmlNode(general, "ExtractCancelText", Me.txtExtractCancelText.Text)

-            MakeXmlNode(general, "Icon", selected_icon)
+            Dim icon_name As String = System.IO.Path.Combine("Resources", System.IO.Path.GetFileName(selected_icon))
+            MakeXmlNode(general, "Icon", icon_name)

             Dim shortcuts As XmlElement = doc.CreateElement("Shortcuts")
             root.AppendChild(shortcuts)
@@ -767,7 +774,7 @@
             If ResHack <> "" Then
                 node = doc.SelectSingleNode("/Settings/General/Icon")
                 If My.Computer.FileSystem.FileExists(node.InnerText) Then
-                    selected_icon = node.InnerText
+                    selected_icon = System.IO.Path.Combine(Application.StartupPath, node.InnerText)
                     imgSelectedIcon.ImageLocation = selected_icon
                 End If
             End If
@@ -886,5 +893,17 @@
     Private Sub cmVar_Opening(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles cmVar.Opening
         Dim cm As ContextMenuStrip = DirectCast(sender, ContextMenuStrip)
         ParentTextBox = cm.SourceControl
+    End Sub
+
+    Private Sub tsAdd7z_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsAdd7z.Click
+        cmdFilesAdd_Click(sender, e)
+    End Sub
+
+    Private Sub tsSaveConfig_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsSaveConfig.Click
+        cmdSaveSettings_Click(sender, e)
+    End Sub
+
+    Private Sub tsLoadConfig_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsLoadConfig.Click
+        cmdLoadSettings_Click(sender, e)
     End Sub
End Class