如何检查菜单项是否被单击 [英] How To Check Whether A Menu Item Is Clicked

查看:66
本文介绍了如何检查菜单项是否被单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我的代码存在问题。我在Visual Studio中使用C#和.NET Framework执行此操作。基本上,当我单击一个菜单项时,会按预期显示一个检查气泡,但是当我单击另一个菜单项时,一切都按预期工作,
但检查气泡文本仍然是相同的。为什么是这样?将附上一些屏幕截图,但我的帐户需要进行验证。这是下面的代码。感谢任何帮助,我真的很感激!

Hello guys. I have an issue with my Code. I'm doing this in Visual Studio, with C# and the .NET Framework. Basically, when I click a menu item, a check bubble appears as expected, but when I click another menu item, everything works as expected, but the check bubble text still reads the same. Why is this? Some screenshots would be attached, but my Account needs to be verified. Here's the Code below. Thanks for any help guys, I really appreciate it!

这是Form1.cs中的代码:

Here's the Code from Form1.cs:

使用System;

使用System.Collections.Generic;

使用System。 ComponentModel;

使用System.Data;

使用System.Diagnostics;

使用System.Drawing;

使用System.IO;

使用System.Linq;

使用System.Text;

使用System.Threading.Tasks;

使用System.Windows.Forms;

推荐答案

嗨Adam_Void,



  monthlyToolStripMenuItem

  createMenuToolStripMenuItem

  createDrinkMenuToolStripMenuItem



它们是父菜单项,还是父菜单中的子项"MenuStrip"?

您是否会插入或共享表单图像?



问候,
Hi Adam_Void,

  monthlyToolStripMenuItem
  createMenuToolStripMenuItem
  createDrinkMenuToolStripMenuItem

Are they parent menu items, or sub items in parent "MenuStrip"?
Would you insert or share your form image?

Regards,


这篇关于如何检查菜单项是否被单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆