将此程序固定到我的 C# 应用程序中缺少的任务栏选项

发布于 2024-09-26 11:02:35 字数 190 浏览 7 评论 0原文

到目前为止,我在 Windows 7 中尝试过的所有程序在任务栏中右键单击它们时都有一个“将此程序固定到任务栏”项目。 我有一个 C# 程序,只显示“关闭窗口”而没有其他内容。它使用 C# 2010 Express 构建,面向 .NET 3.5 框架。

我找不到任何原因为什么没有显示其他选项或任何我可以更改的属性。 有谁知道什么属性会影响这个选项?

All programs I have tried so far in Windows 7 have a 'Pin this program to taskbar' item when right-clicking them in the task bar.
I have a C# program that only shows 'Close Window' and nothing else. It is build with C# 2010 Express, and targets .NET 3.5 framework.

I can't find any reason why no other options show up or any properties I could change.
Does anyone know what property could affect this option?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

海拔太高太耀眼 2024-10-03 11:02:35

造成这种情况的原因可能有以下几个:

  • 位于远程位置(即服务器共享)的可执行文件无法固定;只能固定本地可执行文件
  • 快捷方式或可执行文件名称中的某些字符串会导致该程序被排除在固定之外。这些受限值由 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames 中的注册表项确定,并具有以下默认值:Documentation;Help;Install;More Info;自述文件;自述文件;先读;设置;支持;新增内容;删除

There could be one of a few reasons for this:

  • Executables located on remote locations (i.e. a server share) cannot be pinned; only local executables can be pinned
  • Certain strings in the shortcut or executable name cause that program to be excluded from pinning. These restricted values are determined by a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames and has these default values: Documentation;Help;Install;More Info;Readme;Read me;Read First;Setup;Support;What's New;Remove
○闲身 2024-10-03 11:02:35

这也与你的 EXE 的位置有关。我的问题是我的 EXE 是从网络位置运行的。如果我将其移至本地驱动器,那么世界就一切正常了。

this also has something to do with the location of your EXE as well. my problem was that my EXE was being run from a network location. if i moved it to the local drive then all was right with the world.

醉酒的小男人 2024-10-03 11:02:35

这有时可能是由 Windows 7 中的“功能”引起的,某些文件名被保留,并且在 Windows7 中无法获得任务栏状态,请尝试将您的 .exe 文件重命名为其他名称,您也可以发布您的 .exe 的名称吗?

如果您不想重命名该文件,如果您使用注册表浏览到:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames

您将看到一个带有保留名称的分隔字符串。

This can sometimes be caused by a "feature" in Windows 7, some filenames are reserved and dont get taskbar status in Windows7, try renaming your .exe file to something else also could you post the name of your .exe?

And if you dont want to rename the file if you browse using the registry to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileAssociation\AddRemoveNames

You will see a delimited string with the reserved names.

检查注册表中的 HKEY_CLASSES_ROOT\Applications\[exe name] 。删除该键,您应该再次拥有固定选项(也无需注销或重新启动!)

在我的场景中,我的安装程序文件(由 InstallAware 创建)与程序启动器 exe 具有相同的名称。我猜测当我运行安装程序时,安装程​​序 exe 名称会添加到该注册表位置,因此您无法使用固定选项。我使用 InstallAware 更改了安装程序文件输出名称,这解决了问题。进行简单的重命名是不够的。

Check your registry for HKEY_CLASSES_ROOT\Applications\[exe name] . Remove that key and you should have the pinning options again (without logging out or restarting too!)

In my scenario, my installer file (created by InstallAware) has the same name as the program launcher exe. I am guessing that when I run the installer the installer exe name gets added to that registry location so you can't use the pinning options. I changed my installer file output name with InstallAware and that solved the issue. It is not enough to do a simple rename.

み零 2024-10-03 11:02:35

对于exe。仅文件
遇到这样的问题,简单的方法是:
1.打开程序属性
2.打开文件位置
3.重命名文件(首先复制名称以防万一)
4.然后右键单击文件并固定到任务栏应该在那里
5. 如果这不起作用,请尝试其他名称。

如果失败,您可以随时重命名该 exe。到原来的

这对我来说总是有效

For exe. files only
With a problem like this the easy way is to;
1. Open properties of program
2. Open file location
3. Rename file (first copying name just in case)
4. Then right click on file and pin to taskbar should be there
5. If this doesn't work try another name

If this fails you can always rename the exe. to its original

This as always worked for me

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文