Question: my issue is finding all objects with a specific prefix in the classname, like in the following portion of html I'd like to be able to get us\_mr and us\_she with a single statement.

```
<div>
 <div class="us_me">Some about me</div>
 <div class="us_she">Some about she</div>
 <div class="they_she">Some about others</div>
</div>

```

this what I tried

```
$(".^us_")

```

assuming it would have found

```
<div class="us_me">Some about me</div>
<div class="us_she">Some about she</div>

```

but got syntax error

Answer: 
You can find the solution on this page: <https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/apply-rounded-corners>

I also include the solution here just in case the external link gets deleted.

```
// The enum flag for DwmSetWindowAttribute's second parameter, which tells the function what attribute to set.
public enum DWMWINDOWATTRIBUTE
{
    DWMWA_WINDOW_CORNER_PREFERENCE = 33
}

// The DWM_WINDOW_CORNER_PREFERENCE enum for DwmSetWindowAttribute's third parameter, which tells the function
// what value of the enum to set.
public enum DWM_WINDOW_CORNER_PREFERENCE
{
   DWMWCP_DEFAULT      = 0,
   DWMWCP_DONOTROUND   = 1,
   DWMWCP_ROUND        = 2,
   DWMWCP_ROUNDSMALL   = 3
}

// Import dwmapi.dll and define DwmSetWindowAttribute in C# corresponding to the native function.
[DllImport("dwmapi.dll", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern long DwmSetWindowAttribute(IntPtr hwnd,
                                                 DWMWINDOWATTRIBUTE attribute,
                                                 ref DWM_WINDOW_CORNER_PREFERENCE pvAttribute,
                                                 uint cbAttribute);

```

And to apply the rounded corners to the ContextMenuStrip:

```
ContextMenuStrip notifyIconMenu = new ContextMenuStrip();
...
var attribute = DWMWINDOWATTRIBUTE.DWMWA_WINDOW_CORNER_PREFERENCE;
var preference = DWM_WINDOW_CORNER_PREFERENCE.DWMWCP_ROUND;
DwmSetWindowAttribute(notifyIconMenu.Handle, attribute, ref preference, sizeof(uint));

```

UPD
Here is the implementation of the submenu:

```
ToolStripMenuItem submenu = new ToolStripMenuItem("submenu");
notifyIconMenu.Items.Add(submenu);

ToolStripMenuItem submenuItem1 = new ToolStripMenuItem("submenu1");
submenu.DropDownItems.Add(submenuItem1);
DwmSetWindowAttribute(submenu.DropDown.Handle, attribute, ref preference, sizeof(uint));

```

In case you want to go the proprietary implementation route for rounded corners, here's a method for creating "smooth" ones:

```
Graphics graphics = ...;
...
graphics.InterpolationMode = InterpolationMode.HighQualityBilinear;
graphics.CompositingQuality = CompositingQuality.HighQuality;
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
graphics.SmoothingMode = SmoothingMode.AntiAlias;

```
Did you try to set different `RendererMode` in `CustomContextMenu` other than the default one?

```
protected override void OnHandleCreated(EventArgs e)
{
    base.OnHandleCreated(e);
    if (this.DesignMode == false)
    {
        switch (SystrayTheme)
        {
            case WindowsTheme.Light:
            {
                menuItemTextColor = Color.Black;
            }
            break;
            case WindowsTheme.Dark:
            {
                menuItemTextColor = Color.White;
            }
            break;
            case WindowsTheme.HighContrast:
            {
                menuItemTextColor = Utility.ToDrawingColor(System.Windows.SystemColors.MenuTextColor);
            }
            break;
        }
        this.RenderMode = ToolStripRenderMode.Professional;
        this.Renderer = new MenuRenderer(isMainMenu, primaryColor, menuItemTextColor, MouseOverColor, MouseOverBorderColor, SystrayTheme);
        LoadMenuItemHeight();
    }
}

```