如题?
解决方案 »
- Delphi人气狂飙群——Delphi技术咨询(群号:24819433)——正在狂飙中,欢迎各路豪杰加入!
- 读MYSQL产生“多步操作产生错误”
- 怎样获得wma文件信息。比特率,传输率,声道等等。请专家指点
- select * from table1 a where a.fld1 in ('abddeedd') 为何不出正确结果
- 刚刚学SQL有个小问题,但是我不知道怎么解决,很急...50分对你很好拿
- RTTI中的TTypeInfo有些奇怪
- 用adoconnection执行事务失败
- xmldocumnet的问题
- 我的D6怎么啦?
- Delphi中是否有像VB中:Left()或Right()函数的功能函数?
- 求救!!!!!!!!如何在delphi7下安装delphix
- 请教。关于编译后的提示问题
然后想添加右键事件,
再回调delphi写的函数,
望大虾们赐教
OnCommand(Sender: TObject; const UserInput: IDispatch);但是在函数中不知道怎么从UserInput中获取到自己的信息,
delphi中是否有某个类负责啊,像mfc中的COleDispatchDriver这个类的功能,
望大虾指点
begin
MonAgent.LanguageID:=$409;
MonAgent.Commands.Add('mailbox', 'Lancer Outlook Express', '(courriel),', true, true);
MonAgent.Commands.Add('notepad', 'Lancer le bloc notes', '(notepad)', true, true);
end;uses ShellAPI; procedure TForm1.Agent1Command(Sender: TObject; const UserInput: IDispatch);
var
CommandName : string;
begin
CommandName := IAgentCtlUserInput(UserInput).Name;
if CommandName = 'notepad' then
ShellExecute(handle, 'open', 'notepad', nil, nil, SW_NORMAL)
else if CommandName = 'mailbox' then
ShellExecute(handle, 'open', 'msimn', nil, nil, SW_NORMAL);
end;
[Error] Unit1.pas(31): Undeclared identifier: 'LanguageID'
[Error] Unit1.pas(32): Undeclared identifier: 'Commands' [Error] Unit1.pas(33): Undeclared identifier: 'Commands'
'Commands' 是對應到角色的, 你要大概用如下:
Agent1.Characters.Character('Peedy').Commands.Add()而不是直接用 Agent1, 看你選用那個 Character
'Hello',TRUE,TRUE);
当然也感谢各位的关注
小弟无以为报,
现将分数送上