我可以参考现有应用程序快捷方式显示吐司通知吗?

发布于 2025-02-04 05:35:49 字数 772 浏览 3 评论 0原文

我想从Winforms应用程序中的Windows显示烤面包通知。我正在使用devexpress的toastNotificationManager类来管理该过程。当初始化toastnotificationmanager时,其“ applicationId”属性具有GUID设置,并且由于“开始菜单”中需要的快捷方式才能使用通知,因此我单击SMART中的“创建快捷方式”标签创建一个。

在我看来,就像在.lnk快捷键文件中使用的ID一样,这就是应用程序知道将吐司通知与哪个快捷方式关联的方式。

问题是我的应用程序已经安装在各种民族计算机上,并且每个计算机在应用程序的开始菜单中都有一个快捷方式。到目前为止,我的表单设计师在设计师的设计师中生成的GUID尚未链接到任何内容,而Toast Notification弹出窗口仅显示此GUID,而不是应用程序名称和图标。

是否有一种方法可以通过安装程序检索现有快捷方式文件中使用的应用ID 并在我的toastnotificationmanager中设置该值?这样,我的更新程序可以在每个人的计算机上替换.exe,并且消息立即开始正确显示。

I would like to display toast notifications in windows from my WinForms application. I am using the ToastNotificationsManager class from DevExpress to manage the process. When the ToastNotificationsManager is initialized, its "ApplicationID" property has a GUID set to it, and because a shortcut in the start menu is required for the notifications to work, I click "Create Shortcut" in the smart tag to create one.

It appears to me like that ID is used in the .lnk shortcut file and that's how the application knows which shortcut to associate the toast notification with.

The issue is my application is installed on various peoples computers already and each computer already has a shortcut in the start menu for the application. As of now the GUID that was generated in the designer of my form is not linked to anything and the toast notification popup only show this GUID instead of the application name and icon.

Is there a way to retrieve the application ID used in the existing shortcut file by the installer and set that value in my ToastNotificationsManager? This way my updater can replace the .exe on everyone's computer and the messages instantly begin showing properly.

enter image description here

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文