35 个解决方案
#1
是不是作一些avi动画,进行选择性的播放??
#2
是用程序代码实现的,如果要问代码怎么写,我想给你说:我也不知道!!
真的没有人会!起码我不会!
真的没有人会!起码我不会!
#3
但是,在那些画面的空缺处,动画是不会感应鼠标的????
#4
我看瑞星和金山的杀毒软件上已经实现了???
大家来一起研究以下如何?????
大家来一起研究以下如何?????
#5
其实说简单也是很简单的哦!不过好像很麻烦哦,要很多航代码的哦
#6
是用微软提供的一个接口制作的
忘了叫什么名字了。反正制作并不是很难的
忘了叫什么名字了。反正制作并不是很难的
#7
好像是用了microsoft agent 这个Activex空件!
#8
9494
#9
用API可以实现
#10
40Star(陪你去看--☆流星雨★)说得没错
#11
用非矩形透明窗口能否实现?
#12
microsoft agent
#13
C++ Builder 6 发布了.
#14
不要乱撤了,
#15
palltruey(YoX.Yue) 不要乱撤,早在一年前,我就买过BCB6.0,之不过是挂羊头卖狗肉。
#16
今天刚发布!
www.borland.com
www.borland.com
#17
可以通过 MSAgent 直接使用 MS 提供的助手。
完全自己做也可以,简单地用 Region 系列 API 就可实现,类似的程序有
MP3 Dancer、Virtual Girl(goodies!) 等。国内的也有大话西游系列。这个不难。难在美工,否则做出来的东西画虎不成反类犬,对程序没有好处。
完全自己做也可以,简单地用 Region 系列 API 就可实现,类似的程序有
MP3 Dancer、Virtual Girl(goodies!) 等。国内的也有大话西游系列。这个不难。难在美工,否则做出来的东西画虎不成反类犬,对程序没有好处。
#18
在一个窗体上画动画,把多余的边界抠去就行了
#19
想知道
#20
40Star(陪你去看--☆流星雨★)说的对,金山毒霸 2002 安装里有那东西
#21
微软提供的接口。
不知你用过红山居的“我的助手”没有,红山居把它做得很好。
你可以到www.helperhome.com看看
不知你用过红山居的“我的助手”没有,红山居把它做得很好。
你可以到www.helperhome.com看看
#22
MS Agent Samples for BCB
//Unit1.cpp
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "AgentObjects_OCX"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
load=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if(load==false)
{
wact="Merlin";
act=wact;
char tmp[100];
GetWindowsDirectory(tmp,100);
path=AnsiString(tmp)+"\\MSAGENT\\CHARS\\MERLIN.ACS";
try
{
Agent1->Characters->Load(act,path);
}
catch(...)
{
ShowMessage("不能正常载入莫林助手!");
return;
}
numan=Agent1->Characters->Character(act);
numan->Show(0);
talk="大家好,我是莫林助手,有什么疑问尽管问我好了!";
numan->Speak(talk,"");
load=true;
}
else
ShowMessage("莫林助手已经载入了,请不要重复加载!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
if(load==true)
{
talk="Bye bye 我走了!";
numan->Speak(talk,"");
Sleep(3000);
Agent1->Characters->Unload(act);
load=false;
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
WideString tmpact[28]={"Acknowledge","LookDown",
"Sad","Alert","LookDownBlink","Search","Announce",
"LookUp","Blink","LookUpBlink","Confused",
"LookLeft","Suggest","Congratulate","LookLeftBlink",
"Surprised","Decline","LookRight","Think",
"DontRecognize","LookRightBlink","Wave","Explain",
"Write","Pleased","Read","Greet","RestPose"};
void __fastcall TForm1::RadioGroup1Click(TObject *Sender)
{
if(load==true)
{
BSTR active=tmpact[RadioGroup1->ItemIndex];
numan->Play(active);
talk="我现在正在"+RadioGroup1->Items->Strings[RadioGroup1->ItemIndex]+"呢!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
if(load==true)
{
talk="我要藏起来了!";
numan->Speak(talk,"");
numan->Hide(0);
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
if(load==true)
{
numan->Show(0);
talk="嘿嘿,我又来了!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
头文件Unit1.h
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "AgentObjects_OCX.h"
#include <OleCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TAgent *Agent1;
TButton *Button2;
TRadioGroup *RadioGroup1;
TButton *Button3;
TButton *Button4;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall RadioGroup1Click(TObject *Sender);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
private: // User declarations
bool load;
WideString wact;
BSTR act;
IAgentCtlCharacterExPtr numan;
TVariantInParam talk,path;
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
Unit1.dfm文件
object Form1: TForm1
Left = 305
Top = 135
BorderStyle = bsDialog
Caption = 'Agent Test'
ClientHeight = 418
ClientWidth = 385
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 40
Top = 8
Width = 75
Height = 25
Caption = '载入莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Agent1: TAgent
Left = 8
Top = 24
Width = 32
Height = 32
ControlData = {000300004F0300004F030000}
end
object Button2: TButton
Left = 280
Top = 8
Width = 75
Height = 25
Caption = '释放莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 2
OnClick = Button2Click
end
object RadioGroup1: TRadioGroup
Left = 40
Top = 56
Width = 313
Height = 345
Caption = '人物动作'
Columns = 2
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ItemIndex = 27
Items.Strings = (
'承认'
'向下看'
'悲伤'
'警告'
'向下看眨眼'
'寻找'
'声明'
'向上看'
'眨眼'
'向上看眨眼'
'迷惑'
'向左看'
'建议'
'祝贺'
'向左看眨眼'
'吃惊'
'拒绝'
'向右看'
'思考'
'不承认'
'向右看眨眼'
'挥动'
'解释'
'书写'
'高兴'
'阅读'
'问候'
'恢复初始状态')
ParentFont = False
TabOrder = 3
OnClick = RadioGroup1Click
end
object Button3: TButton
Left = 120
Top = 8
Width = 75
Height = 25
Caption = '隐藏莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 4
OnClick = Button3Click
end
object Button4: TButton
Left = 200
Top = 8
Width = 75
Height = 25
Caption = '显示莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 5
OnClick = Button4Click
end
end
//Unit1.cpp
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "AgentObjects_OCX"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
load=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if(load==false)
{
wact="Merlin";
act=wact;
char tmp[100];
GetWindowsDirectory(tmp,100);
path=AnsiString(tmp)+"\\MSAGENT\\CHARS\\MERLIN.ACS";
try
{
Agent1->Characters->Load(act,path);
}
catch(...)
{
ShowMessage("不能正常载入莫林助手!");
return;
}
numan=Agent1->Characters->Character(act);
numan->Show(0);
talk="大家好,我是莫林助手,有什么疑问尽管问我好了!";
numan->Speak(talk,"");
load=true;
}
else
ShowMessage("莫林助手已经载入了,请不要重复加载!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
if(load==true)
{
talk="Bye bye 我走了!";
numan->Speak(talk,"");
Sleep(3000);
Agent1->Characters->Unload(act);
load=false;
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
WideString tmpact[28]={"Acknowledge","LookDown",
"Sad","Alert","LookDownBlink","Search","Announce",
"LookUp","Blink","LookUpBlink","Confused",
"LookLeft","Suggest","Congratulate","LookLeftBlink",
"Surprised","Decline","LookRight","Think",
"DontRecognize","LookRightBlink","Wave","Explain",
"Write","Pleased","Read","Greet","RestPose"};
void __fastcall TForm1::RadioGroup1Click(TObject *Sender)
{
if(load==true)
{
BSTR active=tmpact[RadioGroup1->ItemIndex];
numan->Play(active);
talk="我现在正在"+RadioGroup1->Items->Strings[RadioGroup1->ItemIndex]+"呢!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
if(load==true)
{
talk="我要藏起来了!";
numan->Speak(talk,"");
numan->Hide(0);
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
if(load==true)
{
numan->Show(0);
talk="嘿嘿,我又来了!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
头文件Unit1.h
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "AgentObjects_OCX.h"
#include <OleCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TAgent *Agent1;
TButton *Button2;
TRadioGroup *RadioGroup1;
TButton *Button3;
TButton *Button4;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall RadioGroup1Click(TObject *Sender);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
private: // User declarations
bool load;
WideString wact;
BSTR act;
IAgentCtlCharacterExPtr numan;
TVariantInParam talk,path;
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
Unit1.dfm文件
object Form1: TForm1
Left = 305
Top = 135
BorderStyle = bsDialog
Caption = 'Agent Test'
ClientHeight = 418
ClientWidth = 385
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 40
Top = 8
Width = 75
Height = 25
Caption = '载入莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Agent1: TAgent
Left = 8
Top = 24
Width = 32
Height = 32
ControlData = {000300004F0300004F030000}
end
object Button2: TButton
Left = 280
Top = 8
Width = 75
Height = 25
Caption = '释放莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 2
OnClick = Button2Click
end
object RadioGroup1: TRadioGroup
Left = 40
Top = 56
Width = 313
Height = 345
Caption = '人物动作'
Columns = 2
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ItemIndex = 27
Items.Strings = (
'承认'
'向下看'
'悲伤'
'警告'
'向下看眨眼'
'寻找'
'声明'
'向上看'
'眨眼'
'向上看眨眼'
'迷惑'
'向左看'
'建议'
'祝贺'
'向左看眨眼'
'吃惊'
'拒绝'
'向右看'
'思考'
'不承认'
'向右看眨眼'
'挥动'
'解释'
'书写'
'高兴'
'阅读'
'问候'
'恢复初始状态')
ParentFont = False
TabOrder = 3
OnClick = RadioGroup1Click
end
object Button3: TButton
Left = 120
Top = 8
Width = 75
Height = 25
Caption = '隐藏莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 4
OnClick = Button3Click
end
object Button4: TButton
Left = 200
Top = 8
Width = 75
Height = 25
Caption = '显示莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 5
OnClick = Button4Click
end
end
#23
对了,先安装ActiveX控件,可查看以前的贴了,搜索Agent!
#24
用Agent呀,上会上网看到一个好网页里面有好多源代码,
不过我只在win2k下做出过(.exe与相应的网页),
据说要装OFFICE 2k后才行.不过我装上后在win98下还不行,至少做出的网页不行.
不过我只在win2k下做出过(.exe与相应的网页),
据说要装OFFICE 2k后才行.不过我装上后在win98下还不行,至少做出的网页不行.
#25
看程序员杂志2002年2月的这一期,里面说的北航的那些用.net做的那个旅行的什么的得奖的那个不是就用到了网页上的助手吗。就是这个。
#26
我以前做过的,不过网站被关了,你查查以前的帖子
#27
path=AnsiString(tmp)+"\\MSAGENT\\CHARS\\MERLIN.ACS";
.acs 是什么文件啊。。。
.acs 是什么文件啊。。。
#28
MS Agent
ACF和ACS都是存放AGENT所使用的人物的
ACF和ACS都是存放AGENT所使用的人物的
#29
好像是microsoft agent!
#30
Another solution: Use TImage component and delete all the blank part on the photo which you import.Then switch several photo to display action.
#31
You can seek the old pages to get more detail.
#32
能不能这样:把N张图片去掉空的,再重画窗体???!!!
#33
microsoft agent控件
#34
to shymeng(编程新手) :
你怎么叫做"编程新手"?你能写出这段代码,已经算是老鸟了,至少算是大鸟!
你怎么叫做"编程新手"?你能写出这段代码,已经算是老鸟了,至少算是大鸟!
#35
关注
#1
是不是作一些avi动画,进行选择性的播放??
#2
是用程序代码实现的,如果要问代码怎么写,我想给你说:我也不知道!!
真的没有人会!起码我不会!
真的没有人会!起码我不会!
#3
但是,在那些画面的空缺处,动画是不会感应鼠标的????
#4
我看瑞星和金山的杀毒软件上已经实现了???
大家来一起研究以下如何?????
大家来一起研究以下如何?????
#5
其实说简单也是很简单的哦!不过好像很麻烦哦,要很多航代码的哦
#6
是用微软提供的一个接口制作的
忘了叫什么名字了。反正制作并不是很难的
忘了叫什么名字了。反正制作并不是很难的
#7
好像是用了microsoft agent 这个Activex空件!
#8
9494
#9
用API可以实现
#10
40Star(陪你去看--☆流星雨★)说得没错
#11
用非矩形透明窗口能否实现?
#12
microsoft agent
#13
C++ Builder 6 发布了.
#14
不要乱撤了,
#15
palltruey(YoX.Yue) 不要乱撤,早在一年前,我就买过BCB6.0,之不过是挂羊头卖狗肉。
#16
今天刚发布!
www.borland.com
www.borland.com
#17
可以通过 MSAgent 直接使用 MS 提供的助手。
完全自己做也可以,简单地用 Region 系列 API 就可实现,类似的程序有
MP3 Dancer、Virtual Girl(goodies!) 等。国内的也有大话西游系列。这个不难。难在美工,否则做出来的东西画虎不成反类犬,对程序没有好处。
完全自己做也可以,简单地用 Region 系列 API 就可实现,类似的程序有
MP3 Dancer、Virtual Girl(goodies!) 等。国内的也有大话西游系列。这个不难。难在美工,否则做出来的东西画虎不成反类犬,对程序没有好处。
#18
在一个窗体上画动画,把多余的边界抠去就行了
#19
想知道
#20
40Star(陪你去看--☆流星雨★)说的对,金山毒霸 2002 安装里有那东西
#21
微软提供的接口。
不知你用过红山居的“我的助手”没有,红山居把它做得很好。
你可以到www.helperhome.com看看
不知你用过红山居的“我的助手”没有,红山居把它做得很好。
你可以到www.helperhome.com看看
#22
MS Agent Samples for BCB
//Unit1.cpp
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "AgentObjects_OCX"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
load=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if(load==false)
{
wact="Merlin";
act=wact;
char tmp[100];
GetWindowsDirectory(tmp,100);
path=AnsiString(tmp)+"\\MSAGENT\\CHARS\\MERLIN.ACS";
try
{
Agent1->Characters->Load(act,path);
}
catch(...)
{
ShowMessage("不能正常载入莫林助手!");
return;
}
numan=Agent1->Characters->Character(act);
numan->Show(0);
talk="大家好,我是莫林助手,有什么疑问尽管问我好了!";
numan->Speak(talk,"");
load=true;
}
else
ShowMessage("莫林助手已经载入了,请不要重复加载!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
if(load==true)
{
talk="Bye bye 我走了!";
numan->Speak(talk,"");
Sleep(3000);
Agent1->Characters->Unload(act);
load=false;
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
WideString tmpact[28]={"Acknowledge","LookDown",
"Sad","Alert","LookDownBlink","Search","Announce",
"LookUp","Blink","LookUpBlink","Confused",
"LookLeft","Suggest","Congratulate","LookLeftBlink",
"Surprised","Decline","LookRight","Think",
"DontRecognize","LookRightBlink","Wave","Explain",
"Write","Pleased","Read","Greet","RestPose"};
void __fastcall TForm1::RadioGroup1Click(TObject *Sender)
{
if(load==true)
{
BSTR active=tmpact[RadioGroup1->ItemIndex];
numan->Play(active);
talk="我现在正在"+RadioGroup1->Items->Strings[RadioGroup1->ItemIndex]+"呢!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
if(load==true)
{
talk="我要藏起来了!";
numan->Speak(talk,"");
numan->Hide(0);
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
if(load==true)
{
numan->Show(0);
talk="嘿嘿,我又来了!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
头文件Unit1.h
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "AgentObjects_OCX.h"
#include <OleCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TAgent *Agent1;
TButton *Button2;
TRadioGroup *RadioGroup1;
TButton *Button3;
TButton *Button4;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall RadioGroup1Click(TObject *Sender);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
private: // User declarations
bool load;
WideString wact;
BSTR act;
IAgentCtlCharacterExPtr numan;
TVariantInParam talk,path;
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
Unit1.dfm文件
object Form1: TForm1
Left = 305
Top = 135
BorderStyle = bsDialog
Caption = 'Agent Test'
ClientHeight = 418
ClientWidth = 385
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 40
Top = 8
Width = 75
Height = 25
Caption = '载入莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Agent1: TAgent
Left = 8
Top = 24
Width = 32
Height = 32
ControlData = {000300004F0300004F030000}
end
object Button2: TButton
Left = 280
Top = 8
Width = 75
Height = 25
Caption = '释放莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 2
OnClick = Button2Click
end
object RadioGroup1: TRadioGroup
Left = 40
Top = 56
Width = 313
Height = 345
Caption = '人物动作'
Columns = 2
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ItemIndex = 27
Items.Strings = (
'承认'
'向下看'
'悲伤'
'警告'
'向下看眨眼'
'寻找'
'声明'
'向上看'
'眨眼'
'向上看眨眼'
'迷惑'
'向左看'
'建议'
'祝贺'
'向左看眨眼'
'吃惊'
'拒绝'
'向右看'
'思考'
'不承认'
'向右看眨眼'
'挥动'
'解释'
'书写'
'高兴'
'阅读'
'问候'
'恢复初始状态')
ParentFont = False
TabOrder = 3
OnClick = RadioGroup1Click
end
object Button3: TButton
Left = 120
Top = 8
Width = 75
Height = 25
Caption = '隐藏莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 4
OnClick = Button3Click
end
object Button4: TButton
Left = 200
Top = 8
Width = 75
Height = 25
Caption = '显示莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 5
OnClick = Button4Click
end
end
//Unit1.cpp
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "AgentObjects_OCX"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
load=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if(load==false)
{
wact="Merlin";
act=wact;
char tmp[100];
GetWindowsDirectory(tmp,100);
path=AnsiString(tmp)+"\\MSAGENT\\CHARS\\MERLIN.ACS";
try
{
Agent1->Characters->Load(act,path);
}
catch(...)
{
ShowMessage("不能正常载入莫林助手!");
return;
}
numan=Agent1->Characters->Character(act);
numan->Show(0);
talk="大家好,我是莫林助手,有什么疑问尽管问我好了!";
numan->Speak(talk,"");
load=true;
}
else
ShowMessage("莫林助手已经载入了,请不要重复加载!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
if(load==true)
{
talk="Bye bye 我走了!";
numan->Speak(talk,"");
Sleep(3000);
Agent1->Characters->Unload(act);
load=false;
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
WideString tmpact[28]={"Acknowledge","LookDown",
"Sad","Alert","LookDownBlink","Search","Announce",
"LookUp","Blink","LookUpBlink","Confused",
"LookLeft","Suggest","Congratulate","LookLeftBlink",
"Surprised","Decline","LookRight","Think",
"DontRecognize","LookRightBlink","Wave","Explain",
"Write","Pleased","Read","Greet","RestPose"};
void __fastcall TForm1::RadioGroup1Click(TObject *Sender)
{
if(load==true)
{
BSTR active=tmpact[RadioGroup1->ItemIndex];
numan->Play(active);
talk="我现在正在"+RadioGroup1->Items->Strings[RadioGroup1->ItemIndex]+"呢!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
if(load==true)
{
talk="我要藏起来了!";
numan->Speak(talk,"");
numan->Hide(0);
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
if(load==true)
{
numan->Show(0);
talk="嘿嘿,我又来了!";
numan->Speak(talk,"");
}
else
ShowMessage("请先载入莫林助手!");
}
//---------------------------------------------------------------------------
头文件Unit1.h
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "AgentObjects_OCX.h"
#include <OleCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TAgent *Agent1;
TButton *Button2;
TRadioGroup *RadioGroup1;
TButton *Button3;
TButton *Button4;
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall RadioGroup1Click(TObject *Sender);
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button4Click(TObject *Sender);
private: // User declarations
bool load;
WideString wact;
BSTR act;
IAgentCtlCharacterExPtr numan;
TVariantInParam talk,path;
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
Unit1.dfm文件
object Form1: TForm1
Left = 305
Top = 135
BorderStyle = bsDialog
Caption = 'Agent Test'
ClientHeight = 418
ClientWidth = 385
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDesktopCenter
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 40
Top = 8
Width = 75
Height = 25
Caption = '载入莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Agent1: TAgent
Left = 8
Top = 24
Width = 32
Height = 32
ControlData = {000300004F0300004F030000}
end
object Button2: TButton
Left = 280
Top = 8
Width = 75
Height = 25
Caption = '释放莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 2
OnClick = Button2Click
end
object RadioGroup1: TRadioGroup
Left = 40
Top = 56
Width = 313
Height = 345
Caption = '人物动作'
Columns = 2
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ItemIndex = 27
Items.Strings = (
'承认'
'向下看'
'悲伤'
'警告'
'向下看眨眼'
'寻找'
'声明'
'向上看'
'眨眼'
'向上看眨眼'
'迷惑'
'向左看'
'建议'
'祝贺'
'向左看眨眼'
'吃惊'
'拒绝'
'向右看'
'思考'
'不承认'
'向右看眨眼'
'挥动'
'解释'
'书写'
'高兴'
'阅读'
'问候'
'恢复初始状态')
ParentFont = False
TabOrder = 3
OnClick = RadioGroup1Click
end
object Button3: TButton
Left = 120
Top = 8
Width = 75
Height = 25
Caption = '隐藏莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 4
OnClick = Button3Click
end
object Button4: TButton
Left = 200
Top = 8
Width = 75
Height = 25
Caption = '显示莫林'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 5
OnClick = Button4Click
end
end
#23
对了,先安装ActiveX控件,可查看以前的贴了,搜索Agent!
#24
用Agent呀,上会上网看到一个好网页里面有好多源代码,
不过我只在win2k下做出过(.exe与相应的网页),
据说要装OFFICE 2k后才行.不过我装上后在win98下还不行,至少做出的网页不行.
不过我只在win2k下做出过(.exe与相应的网页),
据说要装OFFICE 2k后才行.不过我装上后在win98下还不行,至少做出的网页不行.
#25
看程序员杂志2002年2月的这一期,里面说的北航的那些用.net做的那个旅行的什么的得奖的那个不是就用到了网页上的助手吗。就是这个。
#26
我以前做过的,不过网站被关了,你查查以前的帖子
#27
path=AnsiString(tmp)+"\\MSAGENT\\CHARS\\MERLIN.ACS";
.acs 是什么文件啊。。。
.acs 是什么文件啊。。。
#28
MS Agent
ACF和ACS都是存放AGENT所使用的人物的
ACF和ACS都是存放AGENT所使用的人物的
#29
好像是microsoft agent!
#30
Another solution: Use TImage component and delete all the blank part on the photo which you import.Then switch several photo to display action.
#31
You can seek the old pages to get more detail.
#32
能不能这样:把N张图片去掉空的,再重画窗体???!!!
#33
microsoft agent控件
#34
to shymeng(编程新手) :
你怎么叫做"编程新手"?你能写出这段代码,已经算是老鸟了,至少算是大鸟!
你怎么叫做"编程新手"?你能写出这段代码,已经算是老鸟了,至少算是大鸟!
#35
关注