最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

forms - The icon of the app is not visible in the taskbar using C++CLI Winforms - Stack Overflow

programmeradmin3浏览0评论

I am writing an on-screen keyboard with multiple layouts, i.e. multiple forms in one project, with Winforms under c++/CLI, instead of C#.

The user can select the layout by selecting a language in a dropdown list, which exists in each form, and each change results in closing the current form and opening the corresponding new form (new keyboard layout). These forms do not necessarily have to have their own icon, but I want one icon for the entire programme rather than for each form. So in the constructor of each form I have:

this->Icon = gcnew System::Drawing::Icon("example.ico");

This should set up the icon in the taskbar, nevertheless, there is no icon in the taskbar except for the following weird scenarios:

  1. When I select the same language twice, then the icon pops up in the taskbar.
  2. I tried to debug the programme and added the breakpoint at Application::Run(Keyboard);, and I accidentally found that the icon is now visible at the first time the form is opened, but not twice anymore as in the last scenario.

Any idea what I should do to make the icon always visible in the taskbar?

发布评论

评论列表(0)

  1. 暂无评论