【发布时间】:2010-11-11 14:58:14
【问题描述】:
在本教程http://www.codeproject.com/KB/IP/ThinVnc.aspx 中它说:
ThinVNC 不是传统的 VNC,因为 它没有实现 AT&T RFB 协议。相反,它建立在顶部 当今的 Web 标准:AJAX、JSON 和 HTML5。
但是在查看代码时,我觉得它就像是 Delphi,所以有人可以解释一下上面这句话的真正含义:HTML 5 真的能够进行 OS 调用吗?
TWin = class(TObject)
private
Wnd : Hwnd;
Rect : TRect;
Pid : Cardinal;
public
constructor Create(AWnd:HWND;ARect:TRect;APid:Cardinal);
end;
function EnumWindowsProc(Wnd: HWnd; const obj:TList<TWin>): Bool; export; stdcall;
var ProcessId : Cardinal;
R,R1 : TRect;
Win : TWin;
begin
Result:=True;
GetWindowThreadProcessId(Wnd,ProcessId);
if IsWindowVisible(Wnd) and not IsIconic(wnd)then begin
GetWindowRect(Wnd,R);
IntersectRect(R1,R,Screen.DesktopRect);
if not IsRectEmpty(R1) then begin
win := TWin.Create(Wnd,R,ProcessId);
obj.Add(win);
end;
end;
end;
procedure GetProcessWindowList(WinList:TList<TWin>);
begin
WinList.Clear;
EnumWindows(@EnumWindowsProc, Longint(WinList));
end;
【问题讨论】:
-
注意:正确的拼写是HTML5