如果多重文件介面 (MDI) 子表單功能表和最大化,且當您按一下
MenuItem,下拉式
MenuItem 它旁邊會出現
MdiList 屬性設定為
True。
累積補充程式資訊
如果要解決這個問題,取得 Post-Service 套件 2.NET Framework System.Data 和 WinForms Hotfix 套件。如需詳細資訊按一下 [下面的文件編號,檢視 「 Microsoft 知識庫 」 中的發行項]:
328535
(http://support.microsoft.com/kb/328535/EN-US/
)
資訊: post-Service 套件 2.NET Framework System.Data 和 WinForms Hotfix 套件
Hotfix 資訊
支援的 Hotfix 現在可以從 Microsoft,但它只用來修正本文所述的問題。僅適用於發生此特定問題的系統。此 Hotfix 可能會接受其他測試。因此,如果您不會嚴重影響這個問題,我們建議您等候下一個的.NET Framework Service Pack 包含此 Hotfix。
如果要立即解決這個問題,洽詢 Microsoft 技術支援部以取得此修正程式。如需 Microsoft 產品支援服務電話號碼及支援成本的相關資訊的完整清單,請造訪下列 Microsoft 網站]:
注意: 在特殊情況中通常會因支援電話所產生的費用如果,可能就不收取 Microsoft 支援人員認為某特定更新程式可以解決您的問題。典型的支援成本將會套用到其他支援問題是所做不限定特定有問題的更新程式。
此修正程式的英文版具有檔案屬性 (或更新) 中如下表所列。這些檔案的日期和時間為 Coordinated Universal Time (UTC)。當您檢視檔案資訊時,會將它轉換為當地時間。若要到 UTC 與當地時間差異使用 [中日期] 和 [時間] 工具,在 [控制台] 中的 [
時區] 索引標籤]。
Date Time Version Size File name
-------------------------------------------------------------------------
02-May-2002 19:48 1.0.3705.269 1,982,464 System.windows.forms.dll
02-May-2002 10:05 16,696 System.windows.forms.ldo
02-May-2002 10:00 1.0.3705.269 57,344 System.windows.forms.tlb
Microsoft 已確認這是在本文開頭所列之 Microsoft 產品中的問題。
重製行為的步驟
下列步驟使用 Visual C# 做為範例。在 Visual Basic 中類似的程式碼會示範相同的問題。
- 開始在 Visual C# 專案 下的 新的 Windows 應用程式。
- 開啟 Form1.cs,程式碼,並接著以下列範例程式碼取代現有的內容:
namespace MDIMenu
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
public class MainForm : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components;
private System.Windows.Forms.MainMenu mainMenu;
public MainForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//Setup MDI stuff
this.IsMdiContainer = true;
//Add Window Menu
MenuItem miWindow = mainMenu.MenuItems.Add("&Window");
miWindow.MenuItems.Add("&Cascade");
miWindow.MenuItems.Add("Tile &Horizontal");
miWindow.MenuItems.Add("Tile &Vertical");
miWindow.MdiList = true ;
// Adds the MDI Window List to the bottom of the menu.
//Add Help Menu
MenuItem miHelp = mainMenu.MenuItems.Add("&Help");
miHelp.MergeType = MenuMerge.MergeItems;
miHelp.MergeOrder=0;
miHelp.MenuItems.Add("&About");
Document doc = new Document();
doc.MdiParent = this;
doc.Show();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
protected void InitializeComponent()
{
this.components = new System.ComponentModel.Container ();
this.mainMenu = new System.Windows.Forms.MainMenu ();
this.Text = "MDI Menu Bug";
this.AutoScaleBaseSize = new System.Drawing.Size (5, 13);
this.Menu = this.mainMenu;
this.ClientSize = new System.Drawing.Size (450, 200);
}
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
public static void Main(string[] args)
{
Application.Run(new MainForm());
}
}
}
- 在專案中加入 新的 Windows Form。在新的表單以下列範例程式碼取代現有的程式碼:
namespace MDIMenu
{
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Text;
using System.Windows.Forms;
public class Document : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components;
private System.Windows.Forms.MainMenu mainMenu;
public Document() : base()
{
//
// Required for Windows Form Designer support.
//
InitializeComponent();
//Add File Menu
MenuItem miHelp = mainMenu.MenuItems.Add("&Help");
miHelp.MergeType = MenuMerge.MergeItems;
miHelp.MergeOrder=0;
miHelp.MenuItems.Add("This Child Menu
should not appear when clicked on Window menu");
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.mainMenu = new System.Windows.Forms.MainMenu();
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.Text = "Child Window";
this.ClientSize = new System.Drawing.Size(392, 117);
this.Menu = mainMenu;
this.WindowState = FormWindowState.Maximized;
}
}
}
- 執行該應用程式,然後按一下 [視窗] 功能表。[說明] 功能表會出現。
文章編號: 322171 - 上次校閱: 2005年10月11日 - 版次: 3.4
這篇文章中的資訊適用於:
- Microsoft .NET Framework 1.0
| kbmt kbhotfixserver kbqfe kbnetframe100presp2fix kbnetframe100presp3fix kbbug kbfix kbqfe kbwindowsforms KB322171 KbMtzh |
機器翻譯重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。
按一下這裡查看此文章的英文版本:
322171
(http://support.microsoft.com/kb/322171/en-us/
)
Microsoft及(或)其供應商不就任何在本伺服器上發表的文字資料及其相關圖表資訊的恰當性作任何承諾。所有文字資料及其相關圖表均以「現狀」供應,不負任何擔保責任。Microsoft及(或)其供應商謹此聲明,不負任何對與此資訊有關之擔保責任,包括關於適售性、適用於某一特定用途、權利或不侵權的明示或默示擔保責任。Microsoft及(或)其供應商無論如何不對因或與使用本伺服器上資訊或與資訊的實行有關而引起的契約、過失或其他侵權行為之訴訟中的特別的、間接的、衍生性的損害或任何因使用而喪失所導致的之損害、資料或利潤負任何責任。