VB.Net - Controls

Edit ListView Item Label From Second Form
Date : 03 Jun 2011
Views : 473

The following code snippet demonstrates how to edit a ListView label from another form. In this example a ContextMenu is attached to the ListView control. When the edit menu is clicked a second form appears and allows the user to rename the selected item from the ListView control.

Edit ListView Label
Date : 03 Jun 2011
Views : 351

The following code snippet demonstrates how to edit a label on a ListView control using the AfterLabelEdit event. In this example the user is shown a confirmation messagebox allowing the user to cancel the edit.

Get Selected CheckBoxes From ListView
Date : 03 Jun 2011
Views : 478

The following code snippet demonstrates how to get the selected CheckBoxes from a ListView control.

Get Selected Item From ListView
Date : 02 Jun 2011
Views : 585

The following code snippet demonstrates how to get the selected item from a ListView control.

Add Images To ListView Items
Date : 02 Jun 2011
Views : 509

The following code snippet demonstrates how to add images to ListView items using the ImageList class.

Get Selected Date From DateTimePicker
Date : 02 Jun 2011
Views : 429

The following code snippet demonstrates how to get the selected date from a DateTimePicker control using the ValueChanged event.

Add DataGridViewComboBoxColumn To GridView
Date : 01 Jun 2011
Views : 419

The following code snippet demonstrates how to add a ComboBox to a DataGridView control.

Print Preview A DataGridView Control
Date : 01 Jun 2011
Views : 1036

The following code snippet demonstrates how to print preview a DataGridView control, using the PrintDocument and PrintPreviewDialog classes.

Get Selected Items From ListBox
Date : 01 Jun 2011
Views : 456

The following code snippet demonstrates how to get the selected items from a ListBox control.

Add Items To ListBox Control
Date : 31 May 2011
Views : 321

The following code snippet demonstrates how to add items to a ListBox control.


New Snippets

Update Content Label Text From Master Page ASP.Net - C# Miscellaneous

The following code snippet demonstrates how to update the Text property of a Label control located in a page which uses a master page from within the master page code behind file.

HTML Table Paging Javascript Navigation

The following code snippet demonstrates how to apply paging to a HTML table element.

Get Textarea Data Length Javascript Miscellaneous

The following code snippet demonstrates how to display the data length of a textarea element as the user types in data.

Custom TextBox Control With BackColor Hover C# Controls

The following code snippet demonstrates how to create a custom TextBox control, which can change its background color when a user hovers over the TextBox control.

TextBox Validating Event C# Controls

The following code snippet demonstrates how to validate TextBox controls using the Validating event.

Bing Map Control C# - Windows Mobile Controls

This simple code snippet demonstrates how to set the latitude and longitude for the Bing Map control.

Count Down Timer C# - Windows Mobile Miscellaneous

This code snippet demonstrates how to use the DispatcherTimer class to create a count down timer.

Edit And Update A listView Control ASP.Net - C# Controls

The following code snippet demonstrates how to bind a ListView control to a DataTable object and allow the user to edit rows using the ItemEditing and ItemUpdating events of the listView control. This example uses a Microsoft SQL Server and connects to the sample AdventureWorks database.

Remove All Options From Select Javascript Miscellaneous

The following code snippet demonstrates how to clear a select element and remove all options from it.

ListView With DataPager ASP.Net - C# Controls

The following code snippet demonstrates how to page through a ListView control using the DataPager control.

Bind ListView To DataTable ASP.Net - C# Controls

The following code snippet demonstrates how to bind a ListView control to a DataTable object. It also shows how to use the ItemTemplate to display the data.

XmlWriterSettings Example ASP.Net - C# XML

The following code snippet shows how to indent Xml data when using the XmlWriter class.

Deserialize Object From Xml File ASP.Net - VB XML

The following code snippet demonstrates how to deserialize an object from an Xml file and cast the object back into its original type.

Serialize Object To Xml ASP.Net - VB XML

The following code snippet demonstrates how to serialize an object and save it to an Xml file using the XmlSerializer class.

Save And Load Images Drawn On Canvas C# - Windows Mobile Graphics

The following code snippet demonstrates how to draw on a canvas. The canvas image can then be saved and loaded. Images are saved to isolated storage.

Top VB.Net Snippets

This code snippet shows how to use the PrintDocument class to print documents. It uses the PrintPreviewDialog to show the preview of the document a button to print the docuemnt.

This code snippet shows how to add items to groups in a listview control. This example shows how to list drives in groups.

This code snippet gets the properties of the current thread.

Function with picturebox and url as argument to display the passed url to image inside a picturebox.

This code snipet shows how to use the PrintPreviewControl and the PrintDocument class.

This code snippet shows how to create a report and use the CrystalReportViewer control to load the report.

This snippet shows how to develop a custom panel which is semi transparent by overriding CreateParams and the OnPaint method of the Panel control.

This code snippet shows how to add items to a listview control using the ListViewItem class.

This code snippet shows how to drag and drop an image file onto a form and show the image as the forms background image. The form is also resized based on the image size.

This simple snippet shows how to read and write to a MemoryStream() using Binary.