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. Visual Basic
  4. Context Menu

Context Menu

Scheduled Pinned Locked Moved Visual Basic
help
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.
  • K Offline
    K Offline
    KEITHSTER
    wrote on last edited by
    #1

    Hi, Can someone help me with this problemo. I'm trying to get the context menu to popup only when a specific cursor is showing over the control. The control switches cursor ( default to hand and back ) when double clicked. I want the context menu only to popup when the mouse is right clicked AND when the hand cursor is showing. It works for the first time I switch to hand cursor but once I select a menuItem on contextmenu, the contextmenu pops up with both cursors there after. Thanks

    Y 1 Reply Last reply
    0
    • K KEITHSTER

      Hi, Can someone help me with this problemo. I'm trying to get the context menu to popup only when a specific cursor is showing over the control. The control switches cursor ( default to hand and back ) when double clicked. I want the context menu only to popup when the mouse is right clicked AND when the hand cursor is showing. It works for the first time I switch to hand cursor but once I select a menuItem on contextmenu, the contextmenu pops up with both cursors there after. Thanks

      Y Offline
      Y Offline
      yangchengmin
      wrote on last edited by
      #2

      hi,KEITHSTER i hope the following code snippet will help you first put a contextmenu control and a button control in the form then at the code part Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown If e.Button = MouseButtons.Right And Me.Button1.Cursor Is System.Windows.Forms.Cursors.Hand Then ContextMenu1.Show(Button1, New Point(0, 0)) End If End Sub Good luck! if it still not work,put your code here I try my best!

      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