From af80a1c65fa7ba24157be1054d0f07cd90705c2b Mon Sep 17 00:00:00 2001 From: Aditya Vikram Date: Sat, 11 Apr 2020 12:30:22 +0530 Subject: [PATCH] fix --- DelV/DelV.vbproj | 9 --------- DelV/taskbar.vb | 44 ++++++++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/DelV/DelV.vbproj b/DelV/DelV.vbproj index 46d561b..40c2392 100644 --- a/DelV/DelV.vbproj +++ b/DelV/DelV.vbproj @@ -93,15 +93,6 @@ - - ..\packages\Microsoft.Toolkit.Forms.UI.Controls.6.0.0\lib\net462\Microsoft.Toolkit.Forms.UI.Controls.dll - - - ..\packages\Microsoft.Toolkit.Forms.UI.XamlHost.6.0.0\lib\net462\Microsoft.Toolkit.Forms.UI.XamlHost.dll - - - ..\packages\Microsoft.Toolkit.UI.XamlHost.6.0.0\lib\net462\Microsoft.Toolkit.Win32.UI.XamlHost.Managed.dll - diff --git a/DelV/taskbar.vb b/DelV/taskbar.vb index 1cdaad1..3d20859 100644 --- a/DelV/taskbar.vb +++ b/DelV/taskbar.vb @@ -28,27 +28,31 @@ Public Class taskbar Catch End Try - Dim FODLERID_AppsFolder = New Guid("{9E3995AB-1F9C-4F13-B827-48B24B6C7174}") + Try + Dim FODLERID_AppsFolder = New Guid("{9E3995AB-1F9C-4F13-B827-48B24B6C7174}") Dim appsFolder As ShellObject = CType(KnownFolderHelper.FromKnownFolderId(FODLERID_AppsFolder), ShellObject) - Dim pinned = CType(appsFolder.ParsingName, String) + "\TaskBar\" - For Each file As String In Directory.GetFiles(pinned) - If file.Contains(".lnk") Then - Dim btx As New taskbar_button - Dim appicon = AddIcon(file, 1) - btx.Tag = file - btx.BackColor = Color.Transparent - 'btx.Button1.FlatStyle = FlatStyle.Flat - btx.Button1.BackColor = Color.FromArgb(5, 0, 0, 0) - btx.Size = New Size(50, 42) - btx.Name = Path.GetFileNameWithoutExtension(file) - btx.Dock = DockStyle.Left - btx.Menu.Items.Item(1).Visible = False - btx.Menu.Items.Item(3).Visible = False - Rescale(0.45, appicon, btx) - btx.Margin = New Padding(10, 0, 0, 0) - pnned_panel.Controls.Add(btx) - End If - Next + Dim pinned = CType(appsFolder.ParsingName, String) + "\TaskBar\" + For Each file As String In Directory.GetFiles(pinned) + If file.Contains(".lnk") Then + Dim btx As New taskbar_button + Dim appicon = AddIcon(file, 1) + btx.Tag = file + btx.BackColor = Color.Transparent + 'btx.Button1.FlatStyle = FlatStyle.Flat + btx.Button1.BackColor = Color.FromArgb(5, 0, 0, 0) + btx.Size = New Size(50, 42) + btx.Name = Path.GetFileNameWithoutExtension(file) + btx.Dock = DockStyle.Left + btx.Menu.Items.Item(1).Visible = False + btx.Menu.Items.Item(3).Visible = False + Rescale(0.45, appicon, btx) + btx.Margin = New Padding(10, 0, 0, 0) + pnned_panel.Controls.Add(btx) + End If + Next + Catch + MsgBox("Could not get pinned apps!") + End Try End Sub Protected Overrides ReadOnly Property CreateParams As CreateParams Get