忘記密碼?

Blogs about: Vbnet

酷網誌

判別 Null 值

minying wrote 6 months ago: 在撰寫程式時,常會遇到資料庫中欄位的值是NULL的問題,如何判別是NULL值而進行其他流程,我用到的幾種方法如下: Convert.IsDBNull(DataGridView1.Rows(1).Cel … more →

Process 使用筆記

minying wrote 7 months ago: 最近剛好有一個 CASE 需要用 VB.NET 去呼叫執行其他的應用程式,所以花了一些時間了解一下 Process 這個類別的使用。在此記錄一下,方便以後資料的查詢。如果大家有不錯的用法,也歡迎提供分 … more →

標籤: Process

Process 類別 結束執行的應用程式

minying wrote 7 months ago: Process 類別可以用來處理程序,對於結束處理程序有幾個處理步驟,查詢及測試結果,記錄下其中的差異。 CloseMainWindow( ),Close( ) 及 Kill( ) 三種方式。 Clo … more →

標籤: Process

DateTimePicker 日期轉換為民國日期

minying wrote 7 months ago: 上一篇已提到改變 DateTimePicker 的顯示為民國年樣式,有時為了在前端使用西元年樣式,但寫入資料庫時,需轉換為民國年的需求,此時資料就必須轉換。一般我遇到的情形是將「2009年04月22日 … more →

標籤: datetimepicker

DateTimePicker 顯示民國年

minying wrote 7 months ago: 為了限制使用者輸入問題,一般有關日期的輸入項,會使用 DateTimePicker 控制項。有些系統是使用民國年格式,所以也常造成一些使用者介面的問題。現在有兩個狀況,第一個是 DateTimePic … more →

標籤: datetimepicker

隨資料移動 DataGridView 的指標

minying wrote 7 months ago: 資料載入 DataGridView 後,常會用迴圈的方式進行處理,在處理的過程中,為了不使畫面看起來像當掉一般沒有反應,通常我會用隨資料移動 DataGridView 指標的方法,讓使用者知道目前正處 … more →

標籤: DataGridView

顯示 DataGridView 的行號

minying wrote 7 months ago: 顯示 DataGridView 的行號,可在 DataGridView 的 RowPostPaint 事件中加入以下程式碼 Private Sub DataGridView1_RowPostPaint … more →

標籤: DataGridView

可以利用Stopwatch來計算程式的執行時間

minying wrote 10 months ago: 可以利用Stopwatch來計算程式的執行時間 必須先Imports System.Diagnostics Dim sw As New Stopwatch sw.Start() For i As In … more →

計算字串有幾個相同的字

minying wrote 10 months ago: 加入參考 Imports System.Text.RegularExpressions        Dim text1 As String = ”A,B,C,D,E” Dim … more →

標籤: ADO.NET

e.Cancel = True 取消事件的執行

minying wrote 10 months ago: 在每一個事件處理函式中都會帶有[e]參數,e.Cancel=True時,可以取消執行的動作。     Private Sub TextBox1_Validating(ByVal sender As O … more →

TimeSpan物件表示時間間隔

minying wrote 11 months ago: TimeSpan 物件表示測量的時間間隔或期間,可為正或負的天數、時數、分鐘數、秒數和秒數的分數。用來測量期間的最大時間單位是「天」。為保持一致性,會以「天」為單位測量時間間隔,因為更大時間單位 (例 … more →

VB.NET 連結 Access2003 加密的MDB檔

minying wrote 11 months ago: 假如 MDB 檔在 Access 2003 中的 “工具 | 安全性 | 設定資料庫密碼”,則 VB.NET 透過 OleDbConnection 的連線參數必須加上 Jet … more →

標籤: ADO.NET

Form在Load時,直接運行Button1_click中的程序

minying wrote 11 months ago: 產生按鈕的Click事件。 Button1.PerformClick(),可寫在Form_Load事件中,或用於判斷式中都可以。 if  myVar = 1  then     Button1.Per … more →

在 Visual Basic 中從固定寬度的文字檔讀取

minying wrote 1 year ago: TextFieldParser 物件提供簡便且有效的方式來剖析結構化的文字檔,例如記錄檔。 TextFieldType 屬性 (Property) 會定義檔案是否為分隔的檔案,或是具有固定寬度文字欄位 … more →

在 Visual Basic 中從逗號分隔文字檔讀取

minying wrote 1 year ago: TextFieldParser 物件提供簡便且有效的方式來剖析結構化的文字檔,例如記錄檔。TextFieldType 屬性 (Property) 會定義檔案是否為分隔的檔案,或是具有固定寬度文字欄位的 … more →

在 Visual Basic 中從文字檔讀取

minying wrote 1 year ago: My.Computer.FileSystem 物件的 ReadAllText 方法允許您從文字檔讀取。如果檔案的內容是使用 ASCII 或 UTF-8 之類的編碼方式,則可以指定檔案編碼方式。 如果您 … more →

VB.Net 如何過濾重複的陣列元素

minying wrote 1 year ago: 如何過濾重複的陣列元素 << VB.Net 2005 >> 和<< VB.Net 2008 >> 的寫法!! << VB.Net 2005 … more →

ADO 連線字串範例

minying wrote 1 year ago: ADO Connection String Samples This page contains sample ADO connection strings for ODBC DSN / DSN-Le … more →

標籤: ADO.NET

VB.Net 使用 dBase / FoxPro 資料庫

minying wrote 1 year ago: VB.Net 如何存取 xBase / FoxPro 資料庫   << 使用OleDb >>   Imports System.Data.OleDb   Dim strCn A … more →

標籤: ADO.NET


Have your say. Start a blog.

See our free features →

相關標籤
全部 →

Follow this tag via RSS