上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: 我分別編寫了主窗題和子窗體的Closing事件,可當關閉主窗體時,同時也觸發了子窗體的Closing事件。這個讓我很頭疼。 不過我還是找到了解決方法。即在子窗體中加入一個 ”e.CloseReason“ 的事件判斷。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighligh... 阅读全文
posted @ 2008-07-28 12:33 浪子の无悔 阅读(380) 评论(0) 推荐(0) 编辑
摘要: //子表單啟動或關閉事件 this.MdiChildActivate += new EventHandler(FMzMain_MdiChildActivate); Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> private... 阅读全文
posted @ 2008-07-28 12:32 浪子の无悔 阅读(282) 评论(0) 推荐(0) 编辑
摘要: //定義右鍵 ToolStripMenuItem DeletePhraseMe = new ToolStripMenuItem(); DeletePhraseMe.Name = "DeleteBookMark"; DeletePhraseMe.Text = "刪除詞庫"; //定義右鍵事件 ... 阅读全文
posted @ 2008-07-28 12:31 浪子の无悔 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 設置控件的標準顏色類: System.Drawing.SystemColors類 0到9之間數字的ASCII值: 0到9之間數字的ASCII值是48到57,所以就保證字符在這個範圍內。ASCII值8表示退格鍵。 控件的操作無效 KeyPressEventArgs的Handled屬性設置為True,告訴控件不就對字符進行任何操作。 如得到ToolStrip中的子控件 ... 阅读全文
posted @ 2008-07-28 12:31 浪子の无悔 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 剛剛學習了同事編寫的在窗體中打開圖片的代碼,自己也試著做了一例子,以利於學習。 例子如下: 在下列圖片框中雙擊PictureBox插入圖片,並下圖片下方顯示圖片信息。如下圖結果。 代碼如下: Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -... 阅读全文
posted @ 2008-07-28 12:30 浪子の无悔 阅读(2003) 评论(1) 推荐(0) 编辑
摘要: 當我們新建了一個windows窗體應用程序后,單擊運行,后Visual Studo 2005如何顯示窗體的呢?當有多個窗體時,又如何判斷要顯示的窗體呢? 仔細觀察「解決方案資源管理器時」,你會發殃一個名為Program.cs的文件。「查看代碼」后,其中最關鍵的語句是: Code highlighting produced by Actipro CodeHighlighter (freeware... 阅读全文
posted @ 2008-07-28 12:29 浪子の无悔 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 方法: 一、調用窗體FormClosing事件 二、在事件方法中編寫提示代碼 1、調用窗體FormClosing事件 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> //窗體的Closing事件,窗體關閉之前... 阅读全文
posted @ 2008-07-28 12:29 浪子の无悔 阅读(760) 评论(0) 推荐(0) 编辑
摘要: //獲得桌面路徑 string filder = System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); Environment:提供有關目前環境和平台的資訊,以及操作的方法。 Environment.SpecialFolder:提供系統特殊文件夾目錄,其成員如下: ... 阅读全文
posted @ 2008-07-28 12:28 浪子の无悔 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 方法: 1、創建一個菜單項數組。 2、在數組中增加菜單項 3、創建一個彈出式引用菜單 4、將菜單與菜單項加入到彈出式引用菜單中 5、將控件的ContextMenuStrip屬性設置成彈出菜單 如下例: 例1: Code highlighting produced by Actipro CodeHighlighter (freeware) http... 阅读全文
posted @ 2008-07-28 12:27 浪子の无悔 阅读(3050) 评论(0) 推荐(0) 编辑
摘要: # 中如何打印文件呢,本例將用一個實例(打印一些字符)作說明。 本例過程為: 1. 調用打印對話框 2. 啟動打印程序 3. 建立打印事件 4. 建立StringBuilder 5. 將打印內容寫入建立StringBuilder 6. 繪制打印內容(即打印) Code highlighting produced by Actipro CodeHighlighter (freeware) ht... 阅读全文
posted @ 2008-07-28 12:27 浪子の无悔 阅读(1184) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页