如何得到按住Alt + Tab列出来的程序列表及句柄 如题,需要得到按住Alt + Tab列出来的程序列表及句柄,而不是任务管理器中的进程列表. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Alt-Tab出来的应该是窗口的列表,就是任务管理器里面的应用程序。 http://www.graphics.net.cn/bbs/delphi/0044/160.asp procedure TfrmProcessList.GetProcess;var CurWin, Desktop, Len : Integer; //当前窗口句柄,桌面句柄(也是一个句柄),窗体标题长度 Style : longint; //窗体类别 str : array[0..255] of char;begin CurWin := 0; Desktop := GetDesktopWindow; repeat CurWin := findwindowex(Desktop,curwin,nil,nil); //找他的子窗体 Len := GetWindowTextLength(CurWin) + 1; //长度 if IsWindowVisible(curwin) //可见 and ((GetWindowLong(curwin, GWL_HWNDPARENT) = 0) or //是一级窗体 (HWND(GetWindowLong(curwin, GWL_HWNDPARENT)) = GetDesktopWindow)) and((GetWindowLong(curwin, GWL_EXSTYLE) and WS_EX_TOOLWINDOW) = 0) then begin getwindowtext(CurWin,str,len); lbxProcess.Items.Add(Str); end; until CurWin=0; curwin:=0; Desktop:=GetDesktopWindow;end;唉,都不能得到帮助... unidac 的小问题。 如何从baidu贴吧的cgi-bin/genimg中取验证码可用图片 idhttp、WebBrowser``或者随便什么控件都好``` 新改版了, 我的有问题. 翻页问题 有关报表的问题,希望大家能给个意见 nmstrm的简单问题,大家都来看看!!!!!!!!!!!!!!! 树的遍历 这是什么格式的书? 你有没注意到TStringGrid 中虚拟方法SelectCell与她祖先不同!请指点! 100分:如何将VSS中的日期/时间戳加入源程序里??? 大家帮忙看看!谢谢! 怎么将多个Adodataset合并成一个Adodataset?
http://www.graphics.net.cn/bbs/delphi/0044/160.asp
var
CurWin, Desktop, Len : Integer; //当前窗口句柄,桌面句柄(也是一个句柄),窗体标题长度
Style : longint; //窗体类别
str : array[0..255] of char;
begin
CurWin := 0;
Desktop := GetDesktopWindow;
repeat
CurWin := findwindowex(Desktop,curwin,nil,nil); //找他的子窗体
Len := GetWindowTextLength(CurWin) + 1; //长度
if IsWindowVisible(curwin) //可见
and ((GetWindowLong(curwin, GWL_HWNDPARENT) = 0) or //是一级窗体
(HWND(GetWindowLong(curwin, GWL_HWNDPARENT)) = GetDesktopWindow))
and((GetWindowLong(curwin, GWL_EXSTYLE) and WS_EX_TOOLWINDOW) = 0)
then
begin
getwindowtext(CurWin,str,len);
lbxProcess.Items.Add(Str);
end;
until CurWin=0;
curwin:=0;
Desktop:=GetDesktopWindow;
end;唉,都不能得到帮助...