Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

vb.net kontextmenü

Empfohlene Antworten

Veröffentlicht

tachtach,

ich versuch gerade ein kontextmenü in nem treeview zu basteln.

    Private WithEvents _CM As New System.Windows.Forms.ContextMenu

    Private _ContextMenueItem1 As System.Windows.Forms.MenuItem

    Private _ContextMenueItem2 As System.Windows.Forms.MenuItem

.....


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        _ContextMenueItem1 = New System.Windows.Forms.MenuItem("abc")

        _CM.MenuItems.Add(_ContextMenueItem1)


        _ContextMenueItem2 = New System.Windows.Forms.MenuItem("xyz")

        _CM.MenuItems.Add(_ContextMenueItem2)


        tv_firmenbaum.ContextMenu = _CM

das kontextmenü ist auch vorhanden nur weiß ich nicht recht wie ich eine funktion beim klick auf einen menüeintrag aufrufe :confused: wenn ich einer funktion ein
Handles _ContextMenueItem2.Click

anhänge bekomme ich die Fehlermeldung

Die Handles-Klausel erfordert die WithEvents-Variable.
was mach ich falsch?

hast dus mal so versucht:

Private WithEvents _ContextMenueItem2 As System.Windows.Forms.MenuItem

und bei der ereignisauslösung:

Private Sub ContextMenueItem2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenueItem2.Click

ist jetzt aber nur geraten.

s'Amstel

*lol* dafür, dass ich eigentlich nur in VB arbeite, war das jetzt ein volltreffer *fg* ich liebe es :bimei

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.