devxlogo

Tip Bank

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

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

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

Setting the font family of the selected text of a RichTextBox

‘ Set the specified font to the selection of a RichTextBox’ Note: require GetSafeStyleForFontFamily” Example: SetFontFamily(richTextBox1, “Times New Roman”)Public Sub SetFontFamily(ByVal rtb As RichTextBox, ByVal fontName As String) Dim fontFam