Public Class frmTriggerEditor
    Private itemsDictionary As Dictionary(Of String, List(Of ItemInfo))
    Private gridData As RoomData
    Private designerForm As FrmDesigner
    Private highlightedItem As ItemInfo

    ' Variables for frmTrigger
    Private selectedItemInfo As ItemInfo
    Private selectedTriggerSquare As Point = New Point(-1, -1)
    Private selectedActionSquare As Point = New Point(-1, -1)
    Private selectedItemToRemove As String = ""
    Private isSpecificItemSelected As Boolean = False
    Private triggers As New List(Of Trigger)()

    Public Property TriggersList As List(Of Trigger)
        Get
            Return triggers
        End Get
        Set(value As List(Of Trigger))
            triggers = value
        End Set
    End Property

    Public Sub New(itemsDictionary As Dictionary(Of String, List(Of ItemInfo)), gridData As RoomData, designerForm As FrmDesigner, triggersList As List(Of Trigger))
        InitializeComponent()
        Me.itemsDictionary = itemsDictionary
        Me.gridData = gridData
        Me.designerForm = designerForm
        Me.triggers = triggersList
        If Me.triggers Is Nothing Then
            Me.triggers = New List(Of Trigger)()
        End If
        InitializeTriggerList()
        PopulateTreeView()
    End Sub

    Private Sub InitializeTriggerList()
        lstTrigger.Items.Add("Enters Cell")
        lstTrigger.SelectedIndex = 0 ' Ensure "Enters Cell" is selected by default
    End Sub

    Private Sub PopulateTreeView()
        trvTriggers.Nodes.Clear()
        If triggers Is Nothing Then
            triggers = New List(Of Trigger)()
        End If
        For Each trigger As Trigger In triggers
            Dim newNode As New TreeNode(trigger.ToString())
            trvTriggers.Nodes.Add(newNode)
        Next
    End Sub

    Private Sub btnSpecificItem_Click(sender As Object, e As EventArgs) Handles btnSpecificItem.Click
        Hide()
        designerForm.picGame.Tag = "SelectItem"
    End Sub

    Public Sub UpdateSelectedItemInfo(itemInfo As ItemInfo)
        selectedItemInfo = itemInfo
        isSpecificItemSelected = True
        lblType.Text = $"Item Type: {GetRenamedItem(selectedItemInfo.ImageKey)}"
        PopulateTriggerList(selectedItemInfo.ImageKey)
        UpdateTriggerDescription()
        Me.Show() ' Ensure the form is shown
    End Sub

    Public Sub UpdateSelectedItemToRemove(item As String)
        selectedItemToRemove = item
        Me.Show() ' Ensure the form is shown
        UpdateTriggerDescription()
    End Sub

    Private Sub PopulateTriggerList(itemType As String)
        ' No need to populate lstTrigger as it is always "Enters Cell"
    End Sub

    Private Sub lstTrigger_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstTrigger.SelectedIndexChanged
        If lstTrigger.SelectedItem IsNot Nothing AndAlso lstTrigger.SelectedItem.ToString() = "Enters Cell" Then
            ' Indicate that the user needs to select a square
            Me.Hide()
            designerForm.picGame.Tag = "SelectTriggerSquare"
        End If
        UpdateTriggerDescription()
    End Sub

    Private Sub lstAction_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstAction.SelectedIndexChanged
        If lstAction.SelectedItem IsNot Nothing Then
            lstItem.Enabled = lstAction.SelectedItem.ToString() = "Create"
            If lstAction.SelectedItem.ToString() = "Remove" Then
                ' Indicate that the user needs to select an item to remove
                Me.Hide()
                designerForm.picGame.Tag = "SelectItemToRemove"
            End If
        End If
        UpdateTriggerDescription()
    End Sub

    Private Sub lstItem_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstItem.SelectedIndexChanged
        If lstItem.SelectedItem IsNot Nothing Then
            ' Indicate that the user needs to select a square
            Me.Hide()
            designerForm.picGame.Tag = "SelectActionSquare"
        End If
        UpdateTriggerDescription()
    End Sub

    Private Sub lstItemOfType_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstItemOfType.SelectedIndexChanged
        If lstItemOfType.SelectedItem IsNot Nothing Then
            isSpecificItemSelected = lstItemOfType.SelectedItem.ToString() = "Specific Item"
            UpdateTriggerDescription()
        End If
    End Sub
    Private Sub UpdateTriggerDescription()
        Dim itemType As String = If(isSpecificItemSelected AndAlso selectedItemInfo IsNot Nothing, selectedItemInfo.UniqueId, lstItemOfType.SelectedItem?.ToString())
        Dim triggerAction As String = If(lstTrigger.SelectedItem IsNot Nothing, lstTrigger.SelectedItem.ToString(), "")
        Dim action As String = If(lstAction.SelectedItem IsNot Nothing, lstAction.SelectedItem.ToString(), "")
        Dim itemToCreate As String = If(lstItem.SelectedItem IsNot Nothing, lstItem.SelectedItem.ToString(), "")
        Dim triggerSquare As String = If(selectedTriggerSquare <> New Point(-1, -1), $"Square ({selectedTriggerSquare.X}, {selectedTriggerSquare.Y})", "")
        Dim actionSquare As String = If(selectedActionSquare <> New Point(-1, -1), $"Square ({selectedActionSquare.X}, {selectedActionSquare.Y})", "")
        Dim itemToRemove As String = selectedItemToRemove

        Dim description As String
        If action = "Remove" Then
            description = $"When {itemType} {triggerAction} {triggerSquare}, remove {itemToRemove} from the game."
        Else
            description = $"When {itemType} {triggerAction} {triggerSquare}, {action} a {itemToCreate} at {actionSquare}."
        End If

        rtbTrigger.Rtf = GetRichText(description, itemType, triggerAction, triggerSquare, action, itemToCreate, actionSquare, itemToRemove)

        ' Enable the create button if the description is complete
        btnCreate.Enabled = ValidateTrigger()
    End Sub

    Private Function GetRichText(description As String, itemType As String, triggerAction As String, triggerSquare As String, action As String, itemToCreate As String, actionSquare As String, itemToRemove As String) As String
        Dim rtf As String = "{\rtf1\ansi "

        If itemType <> "" Then
            rtf &= description.Replace(itemType, $"{{\b\cf2 {itemType}}}")
        End If

        If triggerAction <> "" Then
            rtf = rtf.Replace(triggerAction, $"{{\i {triggerAction}}}")
        End If

        If triggerSquare <> "" Then
            rtf = rtf.Replace(triggerSquare, $"{{\i\cf4 {triggerSquare}}}")
        End If

        If action <> "" Then
            rtf = rtf.Replace(action, $"{{\i {action}}}")
        End If

        If itemToCreate <> "" Then
            rtf = rtf.Replace(itemToCreate, $"{{\b\cf2 {itemToCreate}}}")
        End If

        If actionSquare <> "" Then
            rtf = rtf.Replace(actionSquare, $"{{\i\cf4 {actionSquare}}}")
        End If

        If itemToRemove <> "" Then
            rtf = rtf.Replace(itemToRemove, $"{{\b\cf2 {itemToRemove}}}")
        End If

        rtf &= "}"
        Return rtf
    End Function

    Private Function ValidateTrigger() As Boolean
        Return lstTrigger.SelectedItem IsNot Nothing AndAlso lstAction.SelectedItem IsNot Nothing AndAlso
               (lstAction.SelectedItem.ToString() = "Remove" OrElse (lstItem.SelectedItem IsNot Nothing AndAlso selectedActionSquare <> New Point(-1, -1))) AndAlso
               selectedTriggerSquare <> New Point(-1, -1)
    End Function

    Public Sub SetSelectedTriggerSquare(square As Point)
        selectedTriggerSquare = square
        UpdateTriggerDescription()
        Me.Show()
    End Sub

    Public Sub SetSelectedActionSquare(square As Point)
        selectedActionSquare = square
        UpdateTriggerDescription()
        Me.Show()
    End Sub

    Public Sub SetSelectedItemToRemove(item As String)
        selectedItemToRemove = item
        UpdateTriggerDescription()
        Me.Show()
    End Sub

    Private Function GetRenamedItem(itemKey As String) As String
        Select Case itemKey
            Case "picCoin"
                Return "Coin"
            Case "picFlipper1"
                Return "Flipper Left"
            Case "picFlipper2"
                Return "Flipper Right"
            Case "picFlipper3"
                Return "Flipper Up"
            Case "picFlipper4"
                Return "Flipper Down"
            Case "picLaser1"
                Return "Vertical Laser"
            Case "picLaser2"
                Return "Horizontal Laser"
            Case Else
                Return itemKey.Replace("pic", "")
        End Select
    End Function

    Private Sub ClearForm()
        lstTrigger.SelectedIndex = 0 ' Ensure "Enters Cell" is selected by default
        lstAction.SelectedIndex = -1
        lstItem.SelectedIndex = -1
        lstItemOfType.SelectedIndex = -1
        selectedTriggerSquare = New Point(-1, -1)
        selectedActionSquare = New Point(-1, -1)
        selectedItemToRemove = ""
        rtbTrigger.Clear()
        isSpecificItemSelected = False
    End Sub
    Private Sub AddTriggerToTreeView()
        Dim trigger As New Trigger With {
        .ItemType = If(isSpecificItemSelected AndAlso selectedItemInfo IsNot Nothing, GetRenamedItem(selectedItemInfo.ImageKey), lstItemOfType.SelectedItem?.ToString()),
        .TriggerAction = lstTrigger.SelectedItem?.ToString(),
        .Action = lstAction.SelectedItem?.ToString(),
        .ItemToCreate = lstItem.SelectedItem?.ToString(),
        .TriggerSquare = selectedTriggerSquare,
        .ActionSquare = selectedActionSquare,
        .ItemToRemove = selectedItemToRemove
    }
        triggers.Add(trigger)

        Dim newNode As New TreeNode(trigger.ToString())
        trvTriggers.Nodes.Add(newNode)
    End Sub

    Private Sub mnuDelete_Click(sender As Object, e As EventArgs) Handles mnuDelete.Click
        ' Get the selected node
        Dim selectedNode As TreeNode = trvTriggers.SelectedNode

        If selectedNode IsNot Nothing Then
            ' Find the trigger associated with the selected node
            Dim triggerToRemove As Trigger = Nothing
            For Each trigger As Trigger In triggers
                If trigger.ToString() = selectedNode.Text Then
                    triggerToRemove = trigger
                    Exit For
                End If
            Next

            ' Remove the trigger from the list
            If triggerToRemove IsNot Nothing Then
                triggers.Remove(triggerToRemove)

                ' Remove the node from the TreeView
                trvTriggers.Nodes.Remove(selectedNode)
            End If
        End If
    End Sub
    Private Sub btnCreate_Click(sender As Object, e As EventArgs) Handles btnCreate.Click
        If ValidateTrigger() Then
            AddTriggerToTreeView()
            ClearForm()
            PopulateTreeView() ' Refresh the TreeView to show the new trigger
        Else
            MessageBox.Show("Please fill in all required fields.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

    Private Sub mnuCopy_Click(sender As Object, e As EventArgs) Handles mnuCopy.Click

    End Sub
End Class

Can you add the code for mnuCopy. 

What I want is when the user click mnuCopy. It copies all the text in the highlighted trvTriggers node to clipboard.