Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Context menu strips event sources?

Context menu strips event sources?

Scheduled Pinned Locked Moved C#
csharptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dominik Reichl
    wrote on last edited by
    #1

    Hello! I am trying to implement a context menu for several different controls (more than one control have the same context menu) in C#.NET 2.0. In .NET 1.1 we could just compare the 'sender' parameter in order to see which control has actually displayed the context menu and issued the command. But in .NET 2.0 I get a reference to the tool strip item of the context menu in 'sender'... How to see which control has actually used the context menu? :confused: I already tried several different ways (like checking the controls with .Focused, etc.), but nothing worked :( Best regards Dominik


    _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

    D 1 Reply Last reply
    0
    • D Dominik Reichl

      Hello! I am trying to implement a context menu for several different controls (more than one control have the same context menu) in C#.NET 2.0. In .NET 1.1 we could just compare the 'sender' parameter in order to see which control has actually displayed the context menu and issued the command. But in .NET 2.0 I get a reference to the tool strip item of the context menu in 'sender'... How to see which control has actually used the context menu? :confused: I already tried several different ways (like checking the controls with .Focused, etc.), but nothing worked :( Best regards Dominik


      _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;) (doesn't work on NT)

      D Offline
      D Offline
      Darryl Borden
      wrote on last edited by
      #2

      See if the eventargs parameter has an index property - I ran into the same kind of issue with a tab control (trying to determine which tab page generated the event) and found e.Index held the answer. dpb Darryl Borden Principal IT Analyst dborden@eprod.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups