| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1213 人关注过本帖
标题:delphi的代码帮转成VB6
只看楼主 加入收藏
workhow
Rank: 2
等 级:论坛游民
帖 子:122
专家分:21
注 册:2007-8-31
结帖率:100%
收藏
 问题点数:0 回复次数:0 
delphi的代码帮转成VB6
procedure WinEventProc(hWinEventHook_: DWORD; event: DWORD; hwd: HWND; idObject: LONG; idChild: LONG; dwEventThread: DWORD; dwmsEventTime: DWORD); stdcall;
var
     sbuf: PChar;
begin

    GetMem(sbuf, MAX_PATH);
    GetWindowText(hwd, sbuf, MAX_PATH);

    if Pos('百度', sbuf) > 0 then PostMessage(hwd, WM_CLOSE, 0, 0);

    FreeMem(sbuf);

end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin

    UnhookWinEvent(hEventHook)

end;

procedure TForm1.FormCreate(Sender: TObject);
begin

    hEventHook := SetWinEventHook(EVENT_MIN,
                                EVENT_MAX,
                                0,
                                @WinEventProc,
                                0,
                                0,
                                WINEVENT_OUTOFCONTEXT or WINEVENT_SKIPOWNPROCESS);

end;
搜索更多相关主题的帖子: delphi 代码 
2008-11-21 21:46
快速回复:delphi的代码帮转成VB6
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015901 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved