VB2005 Tips and Tricks – part 3

Use the My Objects to Program Common Tasks

Type My. and select:

My.Computer

Information about the current computer, network, mouse and keyboard, printer, screen and clock. Also sounds, files, registry and clipboard

My.Application

Information about current application and context, assembly version, current folder, culture, command line arguments and log events

My.User

Information about current user

My.Forms

Default instances to any form in the app and to communicate between forms without needing to track from references in another class.

My.WebServices

Provides a default proxy-class instance for every web service

My.Settings

Allows you to retrieve custom settings from your application XML config file

My.Resources

Allows you to retrieve resources-blocks of binary or text data that are compiled intro your application assembly

Comments are closed.