Tip Bank

DevX

Retrieve Windows and System directories

In VB.NET you don’t need to call the GetWindowsDirectory and GetSystemDirectory API functions to retrieve the path the Windows and System directories. Retrieving the System directory is as simple as

DevX

Determine the Windows version

You don’t need to call any Windows API function in VB.NET to determine which version of Windows your application is running on, because this information is exposed by the Environment.OSVersion

DevX

Determine type and number of CPUs

There is no method call that directly retuns information about the number and type of installed CPU(s). However, this information is stored in a few environment variables, so it’s just

DevX

Hiding pages of a TabControl

Sometimes you may need to hide or show some pages of a TabControl according to the information you want to show, basing on the currently logged-in user for example (users