您的位置首页百科问答

VB中怎样使用msagent

VB中怎样使用msagent

的有关信息介绍如下:

VB中怎样使用msagent

希望这个代码可以帮到你,这是我曾经写给自己女朋友的一个桌面小宠物,看到你的问题,不禁又想起从前的事情。不知道她是否还会记得,呵呵。如果你不会,可以hi我,或者加我QQ,我把源代码发给你。Dim Dot0 As IAgentCtlCharacterExDim AgentRequest As IAgentCtlRequestPrivate Sub Agent1_DblClick(ByVal CharacterID As String, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Integer, ByVal y As Integer)end '这里是双击后退出程序End SubPrivate Sub Form_Load()Set AgentRequest = Agent1.Characters.Load("Dot0", App.Path & "\dolphin.acs")Set Dot0 = Agent1.Characters.Character("Dot0")Dot0.Show (1)Dot0.MoveTo 480, 500, 0'Dot0.Play ("idle1_1")Me.HideEnd SubPrivate Sub PlayGame()RandomizeSelect Case Int(Rnd * 13) + 1Case 1Dot0.Play ("alert")Dot0.Play ("idle1_1")Case 2Dot0.Play ("congratulate")Dot0.Play ("idle1_1")Case 3Dot0.Play ("explain")Dot0.Play ("idle1_1")Case 4Dot0.Play ("gesturedown")Dot0.Play ("idle1_1")Case 5Dot0.Play ("gestureleft")Dot0.Play ("idle1_1")Case 6Dot0.Play ("gestureright")Dot0.Play ("idle1_1")Case 7Dot0.Play ("gestureup")Dot0.Play ("idle1_1")Case 8Dot0.Play ("getattention")Dot0.Play ("idle1_1")Case 9Dot0.Play ("gettechy")Dot0.Play ("idle1_1")Case 10Dot0.Play ("getwizardy")Dot0.Play ("idle1_1")Case 11Dot0.Play ("greeting")Dot0.Play ("idle1_1")Case 12Dot0.Play ("sendmail")Dot0.Play ("idle1_1")Case 13Dot0.Play ("wave")Dot0.Play ("idle1_1")End SelectEnd SubPrivate Sub Timer1_Timer()'根据自己的需要设定时间,最好是五秒以上Call PlayGameEnd Sub