从Intptr句柄创建控件 [英] Create Control from Intptr Handle

查看:88
本文介绍了从Intptr句柄创建控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



带子窗的把手(是按钮型).
在我的应用程序中,我想从此句柄创建控件.如何使用句柄创建控件?

我使用函数Control.FromHandle()和Control.FromChildHandle(),但它返回null.

任何机构以前都做过吗?

此致
Somnath.

Hi,

I take handle of child window (it is of button type).
In my application I want to create control from this handle. How to create control using handle?

I use functions Control.FromHandle() and Control.FromChildHandle(), but it return null.

Any body has done this before?

Regards,
Somnath.

推荐答案

您未指定在何处获得子窗口句柄.
仅当您传入的句柄实际上是应用程序中的Control时,此方法才有效.
You don''t specify where you get the child window handle.
This method only works if the handle you pass in actually is a Control in your application.


这篇关于从Intptr句柄创建控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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