Windowless Controls

◇◆丶佛笑我妖孽 提交于 2021-01-28 06:31:53

问题


The MSDN page for the ShowWithoutActivation method - here - on a Form state that ToolStripItems are windowless.

What does it mean for a control to be windowless? What purpose do they serve? How can I make my own Windowless controls?


回答1:


In underlying Windows architecture, a Control is basically a borderless Window. They are 90% the same thing.

A ToolStripItem, on the other hand, does not derive from Control. It does not draw itself, it does not have a Window handle or a message queue. A ToolStripItem is just a class that functions as an organizational extension of the ToolStrip. The ToolStrip forwards many messages and events to the ToolStripItems.

The purpose of this is to improve performance and allow better transparency.



来源:https://stackoverflow.com/questions/11145387/windowless-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!