Component Initialization - Runtime vs. Designtime

时间秒杀一切 提交于 2019-12-19 07:51:34

问题


I have a series of visual compound components that I'm building, which use similar / common "connect" methods, which fire up there internal tables, etc.

I am automating some of the connection stuff to connect automatically at runtime. How do I tell, at the component level, if the current state is runtime or designtime?


回答1:


I think you want to check if the csDesigning flag is present in the component's ComponentState property:

if csDesigning in ComponentState then
  // designtime
else
  // not designtime


来源:https://stackoverflow.com/questions/691997/component-initialization-runtime-vs-designtime

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