Programming Help:ShowPopupMenu Method
Appearance
| ShowPopupMenu Method | |
|---|---|
| Displays the character's pop-up menu at the specified location. |
|
| Introduced in version: | Microsoft Agent 2.0 |
| Removed in version: | Still in use |
| Allowed values: | x, y (pixel coordinates, required) |
| Default value: | N/A |
Parts
| Part | Description |
|---|---|
| x,y | Required. An integer value that indicates the horizontal (x) screen coordinate and vertical (y) screen coordinate to display the menu. Express these coordinates in pixels. |
Examples
Inline example (VB.NET)
Rover.ShowPopupMenu(125, 600)
Advanced example (VB.NET)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Rover.Play("Acknowledge")
' ShowPopupMenu expects screen coordinates
Dim menuX As Integer = Rover.Left + (Rover.Width \ 2)
Dim menuY As Integer = Rover.Top + Rover.Height + 10
Rover.ShowPopupMenu(menuX, menuY)
End Sub
Remarks
Agent automatically displays the character's pop-up menu when the user right-clicks the character. If you set AutoPopupMenu to False, you can use this method to display the menu. Only one popup menu can be displayed at a time.