原创 [c#]DataGridView與貨幣管理器的位置關聯的行不能設置爲不可見異常處理機制

 在DataGridView中,選擇行無法隱藏的問題! 當直接用程序中的 DataGridView.SelectRows[0].Visible = false; 程序會報出一個異常! 異常錯誤如下:System.InvalidOperat

原创 SQL 逗號分割數據

有很多數據,格式是這樣的 由數字與逗號、或是純數字組成 或是NULL 如果有逗號,就截取第一個逗號之前的數字,沒有逗號就直接返回數字 例如: 123

原创 gdi+ 的 graphicspath

gdi+的graphicspath很強大,就我的理解是它可以記錄下來你繪圖的過程,最後一起畫出來。 由於我是使用c#編程的,對指針很模糊。gdi+畫

原创 datagridview多行移動

網上很多datagridview多行刪除的例子,但多行移動還真不多,今天正好做到了,在這裏記一下,只記下上移了,下移一樣的 private void picUp_Click(object sender, EventArg

原创 datagridview添加時間列

//建立以下類 public class CalendarColumn : DataGridViewColumn { public CalendarColumn() : base(new C

原创 DataGridview第一列隱藏

private void filldgv() { dgvDevice.Columns.Clear(); dgvDevice.AutoG

原创 DataGridView 輸入不正確格式值時發生的錯誤 ,處理DataError事件

當DataGridView 中某一列綁定爲Int類型時,當編輯輸入字符類型,便會彈出錯誤對話框,上面會有若干條錯誤,並且說要替換該對話框請處理DataError事件的,這本來是好事。但關鍵是DataError事件觸發在CellValueC

原创 DataGridView繪製序號!

private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) {

原创 winform 文件上傳,及錯誤集錦

要實現winform的文件上傳功能,ftp什麼的暫時不會,上網找了許多,最後搞出來了,不算是原創,但把一些東西總結在了一起 #region 上傳、下載類 /// <summary> ///

原创 WinForm--CheckedListBox數據綁定

雖然點的時候沒有提示,但是CheckedListBox也是支持像ComboBox一樣的數據綁定的             cblBtn.DataSource = dt;             cblBtn.DisplayMember =

原创 datagridview 只能輸入數字

private void input_KeyPress(object sender, KeyPressEventArgs e) { if (!(Char.IsNumber(e.Key

原创 Form作爲子控件,顯示在Panel中

/// <summary> /// 在panel中顯示窗體form /// </summary> /// <param name="form"></param>

原创 服務器之間數據複製

INSERT OPENROWSET('SQLOLEDB', 'server=sql服務器名或IP地址;uid=用戶名;pwd=密碼',數據庫名.架構名.表名)(列,列...)</p><p align="left">SELECT 列,列..

原创 使用SqlDependency後,數據庫日誌增長過快,並有錯誤 Service Broker needs to access the master key in the database .

 日誌錯誤: Service Broker needs to access the master key in the database 'BRM_TEST'. Error code:32. The master key has to

原创 C# 無邊框窗體移動 點擊任務欄實現最小化與還原

[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool ReleaseCapture();