点击Component\Import ActiveX Control...,从列表中找到
Microsoft Agent Control 2.0 安装。
另外你还需要角色文件,比如office中的每一个助手都有一个文件
在windows\msagent\chars目录下(最好有office xp的助手)。
下面程序调用(你得帮刚才装的activex放在窗体上):
procedure TForm1.Button1Click(Sender: TObject);
const
  DATAPATH = 'genie.acs';  //角色文件名
var
  Genie: IAgentCtlCharacterEx;
  LoadRequest: IAgentCtlRequest;
begin
  LoadRequest:= Agent1.Characters.Load('Genie', DATAPATH);
  Genie:= IAgentCtlCharacterEx(Agent1.Characters['Genie']);
  Genie.LanguageID:=$409;
  Genie.Commands.Add('Instructions', '&Instructions', '(how do I order [a pizza]|[give me] [(some|the) instructions])',false,true);
  Genie.Commands['Instructions'].ConfidenceText := 'Didn''t understand your request.';
  Genie.Commands['Instructions'].Confidence := -60;
  Genie.Show(true);
  Genie.MoveTo(300,300,500); 
end;

解决方案 »

  1.   

    角色文件里存有这个角色各个动作的图片等资料
    微软网站上有下载这些文件
    微软网站也有个工具可以做这种文件,office xp的
    助手全是这种文件
      

  2.   

    关于Agent技术的home page:
    http://www.microsoft.com/msagent/
    角色文件:
    http://www.microsoft.com/msagent/downloads.htm#character
    例子:
    http://www.microsoft.com/msagent/codesamples.htm
    角色编辑器:
    http://www.microsoft.com/msagent/devdownloads.htm#character
      

  3.   

    请问怎么在角色编辑器里编辑角色文件?
    就像microsoft的Office助手一样,有一些动作和声音?
    谢谢~~