我的this.Handle.ToInt32需要帮助. [英] Need help with my this.Handle.ToInt32.

查看:320
本文介绍了我的this.Handle.ToInt32需要帮助.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我.
目前,我正在尝试使用C#来构建Google Earth.
但是我遇到了这个问题.

SetParent(ge.GetRenderHwnd(),this.Handle.ToInt32());

错误与this.Handle.ToInt32有关,错误指出:

它不包含句柄"的定义,找不到可以接受类型为________(我的文件名)的第一个争论的扩展方法句柄".

有人可以帮我吗?
非常感谢.

Please help me with this.
Currently i''m trying out to do up a google earth using C#.
But i''ve met with this problem.

SetParent(ge.GetRenderHwnd(), this.Handle.ToInt32());

The error is with the this.Handle.ToInt32, the error states that:

It does not contain a definition for ''Handle'' and no extension method ''Handle'' accepting a first arguement of type ________ (my file name) could be found.

Can someone help me with this?
Thanks alot.

推荐答案

您甚至没有解释"this"的类型是什么,并试图获得一些答案.这行不通,不是很明显.但是,就是这样:没有这种类型的可访问成员称为Handle.另外,我怀疑您正在尝试将您的Forms经验带给WPF.不,WPF与Windows几乎无关,并且WPF类型中没有Windows句柄.

—SA
You don''t even explain what is the type of "this" and try to get some answer. This cannot work, isn''t that obvious. However, this is what it is: there is no an accessible member called Handle in this type. Also, I suspect you''re trying to carry you Forms experience to WPF. No, WPF has almost nothing to do with Windows, and there are no Windows handles in WPF types.

—SA


请问我该如何为WPF编写代码?
谢谢.
May i knw how do i write the code for WPF then?
Thanks.


这篇关于我的this.Handle.ToInt32需要帮助.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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