获取窗口形式的标题名称? [英] Get Title Name for window form ?
本文介绍了获取窗口形式的标题名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从子窗体的句柄获取WINDOW FORM的名称标题.我使用了IntPtr方法的Getparent(..),GetAncestor(..)函数,但是它是错误的.
希望能帮助我.
非常感谢.
phan
I want get name title of WINDOW FORM from a handle of child form. i used function Getparent(..), GetAncestor(..) of method IntPtr, but it wrong.
wish help me.
thanks very much.
phan
推荐答案
窗体的Parent
属性不是由框架自动设置的.您必须手动执行.
完成此操作后,您可以通过检索this.Parent.Text
来检索表单的标题.
编辑========
不要在这里和C#论坛上都张贴.只需在这两个地方之一问.
TheParent
property of a form isn''t automatically set by the framework. You have to do it manually.
Once you do that, you can retrieve the form''s title by retrievingthis.Parent.Text
EDIT ========
Don''t post both here AND the C# forum. It''s enough to ask in just one of those two places.
这篇关于获取窗口形式的标题名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文