我加MenuStrip在我的应用程序,并添加上ManagerRenderMode的Render Mode.问题在于外观,看起来很内脏.看看那两张照片,我想改变透明的子菜单的白色边框,那个看起来灰色的蓝色矩形菜单和深灰色的子菜单(和他的边框是深蓝色)和边框白色菜单何时被选中.我怎么能这样做?
BackColor是:36; 36; 36和ForeColor是LightGray.


我设法更改了蓝色矩形,选中选项时的白色矩形,选择子菜单选项时的蓝色矩形,但我不知道如何更改white border,请帮助..
这是迄今为止的代码......
Color culoare = Color.FromArgb(20, 20, 20);
Color culoare1 = Color.FromArgb(36, 36, 36);
public override Color MenuItemSelected
{
get { return culoare; }
}
public override Color MenuItemBorder
{
get { return culoare; }
}
public override Color MenuItemSelectedGradientBegin
{
get { return culoare; }
}
public override Color MenuItemSelectedGradientEnd
{
get { return culoare; }
}
public …Run Code Online (Sandbox Code Playgroud) 我制作了一个应用程序,当您运行它时,会将 .exe 放入启动中。我有这样的代码:
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
rkApp.SetValue("smartAppointment", Application.ExecutablePath.ToString());
Run Code Online (Sandbox Code Playgroud)
将为应用程序创建一个注册表以随Windows启动,但有一个问题,一些防病毒软件会将我的应用程序检测为病毒。
如何停止防病毒软件将我的应用程序检测为病毒?
我使用contextMenu1和一个notifyIcon1应用程序.当应用程序进入Tray Icon并且我将按下时Right Click,将出现一个菜单.
代码就是这个(我只添加了2个项目进行测试):
contextMenu1.MenuItems.Add("View");
contextMenu1.MenuItems.Add("Exit");
notifyIcon1.ContextMenu = contextMenu1;
Run Code Online (Sandbox Code Playgroud)
在这一刻,在菜单中我只看到了没有做的东西.
我怎么能增加一个功能,喜欢private void exit()的contextMenu1.MenuItems.Add("Exit").当我预定该Exit项目时,关闭我的应用程序(示例).
我只是在C#中创建一个应用程序,但我不喜欢它.我想让应用程序运行一次.现在,如果我的应用程序正在运行,当我再次运行应用程序时,将启动另一个应用程序.我想让应用程序只运行一次,如果你想再次运行应用程序,而不是创建另一个应用程序,而是启动正在运行的应用程序.
谢谢.
c# ×4
appearance ×1
border ×1
contextmenu ×1
forms ×1
items ×1
menustrip ×1
notifyicon ×1
virus ×1