EnumWindows的 [英] Enumwindows
本文介绍了EnumWindows的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些使用EnumWindows编写的delphi代码,我想
开始将这段代码翻译成C#。是否内置了EnumWindows呼叫
Csharp?或者我必须导入API并以这种方式使用它吗?
谢谢
Wayne
解决方案
你必须使用DllImport
[DllImport(" user32")]
public static extern int EnumWindows(EnumWindowsCB cb, int lparam);
-
Shak
(休斯敦)
" Wayne" <我****** @ community.nospam>在消息中写道
新闻:#V ************** @ tk2msftngp13.phx.gbl ...我有一些代码用delphi编写,使用EnumWindows,我想开始将这段代码翻译成C#。在Csharp中有内置的EnumWindows调用
吗?或者我是否必须导入API并以这种方式使用它?
Wayne
我很抱歉这个愚蠢的问题,但是EnumWindows做了什么?给你
每个MDI子窗口的列表?每个表格?每个应用程序?
Telmo Sampaio
" Wayne" <我****** @ community.nospam>在消息中写道
新闻:#V ************** @ tk2msftngp13.phx.gbl ...我有一些代码用delphi编写,使用EnumWindows,我想开始将这段代码翻译成C#。在Csharp中有内置的EnumWindows调用
吗?或者我是否必须导入API并以这种方式使用它?
Wayne
它将为您提供当前桌面上每个顶级窗口的列表。
从那里为每个窗口,您可以递归调用EnumChildWindow
将为您提供一个列表每个儿童窗户。
谢谢
Wayne
" Telmo Sampaio" < TS ****** @ gmail.com>在留言中写道
新闻:我们************** @ TK2MSFTNGP11.phx.gbl ...我很抱歉愚蠢的问题,但EnumWindows做了什么?给每个MDI子窗口列表
?每个表格?每个应用程序?
Telmo Sampaio
Wayne <我****** @ community.nospam>在消息中写道
新闻:#V ************** @tk2msftngp13.phx.gbl ...我有一些用delphi编写的代码使用EnumWindows,我希望
开始将此代码转换为C#。在Csharp中是否有内置的EnumWindows调用
?或者我是否必须导入API并以这种方式使用它?
Wayne
I have some code written in delphi that uses EnumWindows, I would like to
begin to translate this code to C#. Is there a built in EnumWindows call in
Csharp? or do I have to import the API and use it that way?
Thanks
Wayne
解决方案
You have to use DllImport
[DllImport("user32")]
public static extern int EnumWindows(EnumWindowsCB cb, int lparam);
--
Shak
(Houston)
"Wayne" <Me******@community.nospam> wrote in message
news:#V**************@tk2msftngp13.phx.gbl...I have some code written in delphi that uses EnumWindows, I would like to
begin to translate this code to C#. Is there a built in EnumWindows call in Csharp? or do I have to import the API and use it that way?
Thanks
Wayne
I am sorry for the stupid question, but what does EnumWindows do? Gives you
a list of each MDI Child window? Each Form? Each Application?
Telmo Sampaio
"Wayne" <Me******@community.nospam> wrote in message
news:#V**************@tk2msftngp13.phx.gbl...I have some code written in delphi that uses EnumWindows, I would like to
begin to translate this code to C#. Is there a built in EnumWindows call in Csharp? or do I have to import the API and use it that way?
Thanks
Wayne
It will give you a list of every top level window on the current desktop.
From there for each window you can call EnumChildWindow recursivly which
will give you a list of each of the child windows.
Thanks
Wayne
"Telmo Sampaio" <ts******@gmail.com> wrote in message
news:us**************@TK2MSFTNGP11.phx.gbl...I am sorry for the stupid question, but what does EnumWindows do? Gives you a list of each MDI Child window? Each Form? Each Application?
Telmo Sampaio
"Wayne" <Me******@community.nospam> wrote in message
news:#V**************@tk2msftngp13.phx.gbl...I have some code written in delphi that uses EnumWindows, I would like to begin to translate this code to C#. Is there a built in EnumWindows call
inCsharp? or do I have to import the API and use it that way?
Thanks
Wayne
这篇关于EnumWindows的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文