Windows控件是否将控件设置为visible = false(.NET) [英] Windows handle if a control is set to visible = false (.NET)

查看:123
本文介绍了Windows控件是否将控件设置为visible = false(.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单的问题,.NET中的控件是否将句柄(hWnd)设置为不可见?

Quick question, do controls in .NET have handles (hWnd) if they are set to invisible?

马龙

推荐答案

当Visible属性变为true时,将创建句柄.如果在表单构造函数中将其设置为true(最常见的控件情况),则将在创建表单时发生,发生在Load事件之前.再次将Visible设置为false不会破坏该句柄.

The handle is created when the Visible property becomes true. If it was set to true in the form constructor, the most common case for controls, that will happen when the form is created, right before the Load event. Setting Visible to false again doesn't destroy the handle.

这篇关于Windows控件是否将控件设置为visible = false(.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆