Archive

Posts Tagged ‘Visual Basic’

Refactoring Visual Basic With statements

January 17th, 2012 Comments off

The With statement (in Visual Basic) is used to execute a series of statements of the particular object without requalifying the name of the object. In other words, we can use the With statement to reduce the number of times we needed to manually type the full path to the target object. For example, this function inverts the background color of the active control of the active form in the current Windows application:

Refactoring With Statement sample code

Read more…