dalam trik kali ini kita akan membahas bagaimana cara menampilkan assisten office sebagai media interaktif user untuk menampilkan info2 selain menggunakan msgbox
ayoo langsung saja berkoding ria
Imports System.Windows.Forms
Imports AgentObjects
Public Class Agent
Public aksi As _aksi
Public Merlin As AgentObjects.IAgentCtlCharacter
Public ctlAgent As New AgentObjects.Agent
Public Const DATAPATH = "C:\Windows\Msagent\Chars\Merlin.acs"
Public Sub New()
ctlAgent.Connected = True
ctlAgent.Characters.Load("Merlin", DATAPATH)
Merlin = ctlAgent.Characters("Merlin")
End Sub
Public Enum _aksi
GetAttention
GetAttentionReturn
Explain
Congratulate
Announce
Congratulate_2
DontRecognize
Write
Surprised
Suggest
Wave
End Enum
Public Sub PanggilAgent(ByVal aksi As _aksi, ByVal stringtext As String, ByVal locationX As Integer, ByVal locationY As Integer)
Try
Merlin.MoveTo(CShort(locationX + 420), CShort(locationY + 130))
Merlin.Show()
Merlin.Play(aksi.ToString())
Merlin.Speak(stringtext)
Merlin.IdleOn = True
Catch ex As Exception
MsgBox(Err.Description)
End Try
End Sub
Public Sub moveagent(ByVal htop As Integer, ByVal hleft As Integer, ByVal hwidth As Integer)
Try
Merlin.MoveTo(hleft + 20, htop + hwidth - 200)
Catch ex As Exception
MsgBox(Err.Description)
End Try
End Sub
End Class
jangan sampe lupa, add dulu referencenya, pilih microsoft agent control 2.0. selamat mencoba, semoga bermanfaat
Grand Theft Auto 4 Cheats
11 tahun yang lalu
Tidak ada komentar:
Posting Komentar