Hi~chocj
你的要求可以用DDE來實做~~
Ex:
//--------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.h"
#include "DdeMan.hpp"
//--------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
TDdeClientConv *dde;
bool getURL;
//--------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
dde=new TDdeClientConv(Application);
}
//--------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
dde->CloseLink();
dde->OpenLink();
getURL=dde->SetLink("Iexplore","WWW_GetWindowInfo");
if(getURL)
Edit1->Text=dde->RequestData("0xFFFFFFFF,sURL,sTitle");//取得url和標題
else
ShowMessage("ie沒開");
}
//--------------------------------------------------------------------
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
{
delete dde;
}
//--------------------------------------------------------------------