VB.NET
DateTimePicker – reset focus
Mar 5th
Code Snippet – VB.NET Private Sub DateTimePicker1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.Enter Dim fmt As DateTimePickerFormat = DateTimePicker1.Format DateTimePicker1.Format = DateTimePickerFormat.Long DateTimePicker1.Format = DateTimePickerFormat.Custom DateTimePicker1.Format = fmt End Sub Code Snippet – C# private void dateTimePicker1_Enter(object sender, EventArgs e) { DateTimePickerFormat fmt = dateTimePicker1.Format; dateTimePicker1.Format = DateTimePickerFormat.Long; dateTimePicker1.Format [...]
Auto Complete ComboBox – VB.NET Windows Forms
Feb 24th
Download source files – 17.6 Kb Download demo project – 9.08 Kb Introduction This is a simple code snippet which is used to make an Auto Complete ComboBox. Using the code Usage: Call the subroutine from within the ComboBox’s KeyPress event handler. 1: AutoComplete(ByRef cb As ComboBox, _ 2: ByVal e As System.Windows.Forms.KeyPressEventArgs, _ 3: [...]
Storing and retrieving Images from Access database using VB.Net
Feb 24th
Download source files (38.52 kb) Download demo project (52.11 Kb) Introduction This is a simple code snippet which is used to store and retrieve images from Access database using VB.net. Code 1: Private Sub ShowDetails() 2: Try 3: Dim cn As New OleDb.OleDbConnection 4: Dim cmd As OleDb.OleDbCommand 5: Dim dr As OleDb.OleDbDataReader 6: [...]