| |

VerySource

 Forgot password?
 Register
Search
View: 668|Reply: 3

Strange problem with contextmenu, click event is missing

[Copy link]

2

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-17 20:00:01
| Show all posts |Read mode
this.menuItem1.Click + = new System.EventHandler (this.menuItem1_Click);
Ranch
private void menuItem1_Click (object sender, System.EventArgs e)
{
MessageBox.Show ("sjhiyan");

}

I made it appear like this, maybe it's wrong?

this.contextMenu_MapControl.Show (this.axMapControl1, pt);

When menu is clicked, menuItem1_Click cannot be executed, and the dialog box cannot be seen.

What happened? ?
Reply

Use magic Report

0

Threads

20

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-23 07:45:02
| Show all posts
this.contextMenu_MapControl
with
this.menuItem1.Click
what is the relationship? ?

One is a menu and the other is a menu item. Can you say that it can be executed? ^ _ ^
Reply

Use magic Report

2

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-1-23 08:09:01
| Show all posts
They are bound

this.contextMenu_MapControl.add (menuItem1);
Reply

Use magic Report

2

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-1-23 08:36:01
| Show all posts
I'm not familiar with this. Just say what's right. Ha ha
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list