コード例 #1
0
    protected override void OnHandleCreated(EventArgs e)
    {
        base.OnHandleCreated(e);

        // Get a handle to a copy of this form's system (window) menu
        var hSysMenu = User32.GetSystemMenu(Handle, false);

        // Add a separator
        User32.AppendMenu(hSysMenu, User32.MfSeparator, 0, string.Empty);

        // Add the About menu item
        User32.AppendMenu(hSysMenu, User32.MfString, SysMenuAboutId, "&About");
    }