Time of Update: 2018-12-06
一個方法是把Button的Content設定為<Image/>另一個方法是設定Button的Style屬性。<Window x:Class="WpfApp.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="http:
Time of Update: 2018-12-06
<SCRIPT language=JavaScript> //more javascript from http://www.smallrain.netwindow.onload = getMsg; window.onresize = resizeDiv; window.onerror = function(){} //簡訊通知使用(asilas添加) var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,
Time of Update: 2018-12-06
都知道是\n,但是在屬性面版裡直接輸\n不行,必須用代碼實現。button1.Text = "第一行\n第二行
Time of Update: 2018-12-06
實作類別似AutoCAD或者PhotoShop中圖層的效果。層名稱,層狀態,鎖定,顯示。總結一下DataGridView的小技巧:1.代碼添加列,次序是由右至左,即越先添加的列,越靠右。2.代碼添加行,先添加行數,再往行裡加資料。 dataGridView1.Rows.Add(3); dataGridView1.Rows[0].Cells[0].Value = "圖層一";3.圖片列的使用DataGridViewImageColumn4.去掉列名
Time of Update: 2018-12-06
主要是重寫OnKeyPress事件,如果輸入不正確就不接收字元。protected override void OnKeyPress(KeyPressEventArgs e){ //base.OnKeyPress(e); //如果是退格鍵 if (e.KeyChar == (char)Keys.Back) { return;
Time of Update: 2018-12-06
剛剛在刪除和設定ListBox中的選中項的時候遇到這種錯誤提示。原因是遍曆ListBox中的Items的時候同時操作Item.解決辦法就是改foreach()遍曆Items為for()遍曆Item[i]
Time of Update: 2018-12-06
/*------------------------------------ --公司:西安上古科技發展有限公司 --項目名稱:西安環太科技業務辦公系統 --用途:資料驗證方法 --建立日期:2007-11-22 --建立人:周海軍 ------------------------------------*/ using System; using System.Collections.Generic; using System.Text;
Time of Update: 2018-12-06
如何將自己的代碼自動添加著作權資訊
Time of Update: 2018-12-06
System.Threading.Mutex :同步基元,它只向一個線程授予對共用資源的獨佔訪問權。[MSDN]實現原理: 在程式啟動時,請求一個互斥體,如果能擷取對指定互斥的訪問權,就繼續運行程式,否則就退出程式。測試代碼: class Test { /// <summary> /// 應用程式的主進入點。 /// </summary> [STAThread] static
Time of Update: 2018-12-06
CodePlus V2.0代碼產生器是一款根據資料庫資訊、結合使用者指定的產生條件,自動產生預存程序、資料訪問類、實體資訊類、介面資訊等所有有規律可循的代碼的代碼自動產生工具。目前,CodePlusV2.0 已經提供了基於MSSQL資料庫,產生預存程序 和 供C#編程使用的DAL、Model、UI等各層多種代碼的模板。CodePlus V2.0的主要特徵:■ 基於外掛程式結構,可接入不同的資料提供者,即可實現對MSSQL、Orcale、MySQL、SQLite等等各種資料庫的支援。■ 支援動態模
Time of Update: 2018-12-06
<script type="text/javascript"> function win1(){ var win = new Window({className: "alphacube", title: "Sample", width:250, height:150, top:0, left: 1, parent:$('container')}); win.getContent().innerHTML = "<h1>Constraint inside a div
Time of Update: 2018-12-06
ASP.NET
Time of Update: 2018-12-06
前一些時間在一個項目中想用一個類似C/S架構的Menu菜單功能,但是自己在此之前沒有弄過,不會。於是Google,沒有找到自己理想的控制項,後一為朋友給了一個控制項。效果很是不錯,我想也有和我一樣的朋友會需要她,先將其拿來和大家一起分享。在這裡,我介紹一下ComponentArt. Menu的用法.using System;using System.Collections;using System.ComponentModel;using System.Data;using
Time of Update: 2018-12-06
最好用的MSN組件DotMSN於今天終於開放了原始碼。 剛剛公布的2.0版本有了很大的改進: 1、引入了著名的Mentalis.org開發的Proxy類庫,這樣就實現區域網路內proxy的可能。 2、新P2P架構! 3、Converation下新的Switchboard,原有的Conversion屬性方法都改造到該新類中。 4、新的例子,還加入了UnitTest。 對比編譯後程式集大小就知道了:196kb:86kb,大了一倍多:D
Time of Update: 2018-12-06
如,我有一個自訂控制項Map,它擁有四個用於控制地圖縮放的相依性屬性,允許使用者App.Config來修改預設值,所以在程式裡用Settings.settings設定。1.C#代碼方式Binding binding = new Binding("MapZoom");binding.Source = Properties.Settings.Default;map.SetBinding(Map.ZoomProperty, binding);binding = new Binding("MapZoom
Time of Update: 2018-12-06
前一些時間,看到好多網站上的Flash
Time of Update: 2018-12-06
protected void Table_Create() { //------------------------------------------------------------------ TableRow tr; //定義的表格的行 TableCell tc; //定義表格的列 int TrNum = 15; //行數 int TcNum =
Time of Update: 2018-12-06
前面寫過一篇部落格:PropertyGrid排序http://greatverve.cnblogs.com/archive/2012/02/08/propergrid-order.html這裡沒有解決類別排序的問題,所以到csdn提問了,結果半天沒人回複,就忘了。今天偶爾看到有人回複了,並且解決了類別排序的問題,真是太感謝了。現分享給大家。PropertySorter
Time of Update: 2018-12-06
在Win7下修改檔案,如果非管理員身份,會提示此錯誤。右擊以管理員身份運行即可。加個友好提示:try{}catch (UnauthorizedAccessException ex){ MessageBox.Show("請以管理員身份運行。");}Web下的處理據說是這樣:說明: 執行當前 Web 請求期間,出現未處理的異常。請檢查堆疊追蹤資訊,以瞭解有關該錯誤以及代碼中導致錯誤的出處的詳細資料。異常詳細資料: System.UnauthorizedAccessException:
Time of Update: 2018-12-06
文章目錄 建立Class XProp建立Class XPropDescriptor建立Class XProps 建立下面3個類:XPropXPropDescriptorXProps建立Class XPropXProp 就是使用者將具體使用的屬性。PropertyGrid 很炫的一點就是屬性的定製可以有很大的自由度。在這裡,給出一種最最簡單的形式,屬性包括 Name 和 Value 兩個部分,在 PropertyGrid