Good morning.
Could you tell me about the subject matter?
VisualBasic (.NetFramework 4.0), VisualStudio 2010, Windows 7 (64Bit) dynamically generates and displays items from the context menu.
Some of the items on the menu have additional child items.
At this time, I am trying the ItemClicked event in ContextMenuStrip to detect that the item was selected, but it seems that the child item click cannot be detected in this event.
In this case, how do you detect clicks on all items (parent/child)?
Thank you for your cooperation.
.net vb.net
You can add an event handler to the ToolStripMenuItem
when you dynamically generate it using the AddHandler
statement.
'Dim item As ToolStripMenuItem
AddHandler item.Click,AddressOfitem_Click
…
Private Subitem_Click (sender As Object, eAs EventArgs)
…
End Sub
566 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
884 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
577 PHP ssh2_scp_send fails to send files as intended
606 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.