Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions main/Forms/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ public void OpenFile(string arguments, string path, string workingDirec)
proc.Arguments = arguments;
proc.FileName = path;
proc.WorkingDirectory = workingDirec;
proc.UseShellExecute = true; // Required for launching .lnk and shell-based apps (e.g., Office, UWP); fixes shortcuts not opening

/*
proc.EnableRaisingEvents = false;
Expand Down
14 changes: 14 additions & 0 deletions main/User controls/ucShortcut.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public partial class ucShortcut : UserControl
public ProgramShortcut Psc { get; set; }
public frmMain MotherForm { get; set; }
public Category ThisCategory { get; set; }

// ADDED: Tooltip used to show the shortcut/app name when hovering over the icon.
private ToolTip shortcutToolTip = new ToolTip();

public ucShortcut()
{
InitializeComponent();
Expand All @@ -30,6 +34,16 @@ private void ucShortcut_Load(object sender, EventArgs e)
this.BringToFront();
this.BackColor = MotherForm.BackColor;
picIcon.BackgroundImage = ThisCategory.loadImageCache(Psc); // Use the local icon cache for the file specified as the icon image

// ADDED: Show a hover tooltip so identical icons can be distinguished.
string displayName = !string.IsNullOrWhiteSpace(Psc.name)
? Psc.name
: Path.GetFileNameWithoutExtension(Psc.FilePath);

// ADDED: Attach tooltip to both the UserControl and the actual PictureBox.
// The mouse is usually over picIcon, so setting only "this" may not be enough.
shortcutToolTip.SetToolTip(this, displayName);
shortcutToolTip.SetToolTip(picIcon, displayName);
}

public void ucShortcut_Click(object sender, EventArgs e)
Expand Down