我可以参考现有应用程序快捷方式显示吐司通知吗?
我想从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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论