以往的应用程序我们大多都是使用MessageBox来给用户以反馈,不免显得有点呆板,使用MSAgent来改善客户端的用户体验:



传统的提示方法:
1.JPG
使用MSAgent的提示方法:
2.JPG
代码:

None.gif             axAgent2.Characters.Load( " Role " ,Application.StartupPath + " \\Assistant\\ " + " earl.acs " );
None.gif            axAgent2.Characters[
" Role " ].Show( null );
None.gif            axAgent2.Characters[
" Role " ].Activate( null );
None.gif            axAgent2.Characters[
" Role " ].SoundEffectsOn = true ;
None.gif            axAgent2.Characters[
" Role " ].Top = 200 ;
None.gif            axAgent2.Characters[
" Role " ].Left = 300 ;
None.gif            axAgent2.Characters[
" Role " ].Balloon.FontSize  =   11 ;
None.gif            axAgent2.Characters[
" Role " ].Balloon.Style  =   0x4160001 ;
None.gif            axAgent2.Characters[
" Role " ].Speak( " 正在查询,请稍候dot.gif " , null );
None.gif            axAgent2.Characters[
" Role " ].Listen( true );


下载示例应用程序:http://files.cnblogs.com/lcybest/MSAgentSample.rar

转载于:https://www.cnblogs.com/liangfb/archive/2005/11/30/287494.html

Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐