全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:4178
推到 Plurk!
推到 Facebook!

How to hack delphi environment (IDE)?

 
axsoft
版主


發表:681
回覆:1056
積分:969
註冊:2002-03-13

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-02-11 14:07:37 IP:61.218.xxx.xxx 未訂閱
How to hack delphi environment (IDE)?    資料來源: www.delphi3000.com    This is just a sample application for interacting with Delphi IDE.U can use it more extensively. For invoking other applications u just need to change the menuclick event handler.     Given below is the full code. Compile this unit into a package and install the same. 
unit SubhaExp;     interface     uses Windows,Menus,ExtCtrls,SysUtils,Forms,ToolsApi;     Type 
        TSubhaMenu = Class             Private 
                FMainMenu : TMainMenu; 
                FFileMenu : TMenuItem; 
                FGiriMenu : TMenuItem; 
                Procedure OnMenuItemClick(Sender : TObject);             Public 
                Procedure AddMenuItem; 
                Procedure RemoveMenuItem;             End;     Var  FSubhaMenu : TSubhaMenu;     Procedure Register;     implementation     Procedure TSubhaMenu.AddMenuItem; 
Var i : Integer; 
Begin             FMainMenu := (BorlandIDEServices As INTAServices).MainMenu; 
        For i := 0 to FMainMenu.Items.Count - 1 Do 
        Begin 
             If AnsiSameCaption(FmainMenu.items[i].Caption, 'File') Then 
             Begin 
                FFileMenu := FMainMenu.items[i]; 
                Break; 
             End; 
        End;             FGiriMenu := TMenuItem.Create(FFileMenu); 
        FGiriMenu.Caption := 'Subha IDE Services'; 
        FGiriMenu.OnClick := OnMenuItemClick;             For i := 0 to FFileMenu.count - 1 Do 
        Begin 
                If FFileMenu.Items[i].isLine Then 
                Begin 
                     FFileMenu.Insert(i,FGiriMenu); 
                     Break; 
                End; 
         End;     End;     Procedure TSubhaMenu.RemoveMenuItem; 
Var i : Integer; 
Begin 
        For i := 0 to FFileMenu.Count - 1 Do 
        Begin 
             If AnsiSameCaption(FFileMenu.Items[i].Caption,'Subha IDE Services') Then 
             Begin 
                FFileMenu.Remove(FFileMenu.items[i]); 
                Break; 
             End; 
        End; 
End;     Procedure TSubhaMenu.OnMenuItemClick(Sender : TObject); 
Begin 
        Application.MessageBox(PChar('This Is only a Simple Example'   
        ' to Work With Delphi IDE '   #13#10   ' For Further Details On This Contact'   
        #13#10#13#10   ' Subha@botree.co.in'),PChar('Message From Subha'),MB_OK); 
End;     Procedure Register; 
Begin 
        FSubhaMenu.AddMenuItem; 
        Application.MessageBox('Subha Narayanan Has Hacked Your '   
        ' Delphi Environment !!! '   #13#10   
        ' See You Soon With Lot More Goodies !!! '   
        #13#10   ' CopyRight (c) 2001, Subha Narayanan. ', 
        ' Welcome To Delphi ',MB_SYSTEMMODAL); 
End;     Initialization 
        FSubhaMenu := TSubhaMenu.Create;     Finalization 
        FSubhaMenu.RemoveMenuItem; 
        FSubhaMenu.Free;     end.
聯盟----Visita網站http://www.vista.org.tw ---[ 發問前請先找找舊文章 ]---
系統時間:2024-04-20 1:30:08
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!