devxlogo

Tip Bank

Deselect All Items in a ListView Control

You must set Checked property for each ListViewItem to False to clear all the checked items. ‘Declare the ListViewItemDim lvItem As ListViewItem’ Change each item’s Checked property to FalseFor Each

Make Text Scroll Vertically

Use the following code to make text scroll vertically: Vertical ScrollerThis is Vertical Scrollerwww.devx.com

A Multiple Getter/Setter Implementation

Suppose you’ve got a user interface class with many user options that you need to set/get at the same time. Here’s one way to implement this: class CUI{public: CUI() :

Posting Forms Programmatically

Posting forms in Java is easy. All you need is just a HTML code snippet. Here’s an example: Your Email : * Message : *

How to Write, Use, and Test a Singleton Class

class Mysingleton{ private Mysingleton objsingleton = null; private Mysingleton() { } //single way to get its instance. public Mysingleton getInstance() { if(objsingleton == null) { objsingleton = new Mysingleton(); }

Get Separate Records for the Comma Delimited Values of One Field (TSQL)

Use this code: if object_id(‘tblTemp’)0 drop table tblTempCreate Table tblTemp (Field1 varchar(5),Field2 Varchar(100))insert into tblTempselect ‘C1’ Field1, ‘Value1,Value2’ Field2Unionselect ‘C2’ Field1, ‘Value3,Value4’ Field2 if object_id(‘tblTempOutPut’)0 drop table tblTempOutPutselect * into

Remove Margins from the Browser

Suppose you want to put the contents of a page right up against the edges of the browser’s viewport. While you can force this using absolute positioning, there is a