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
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
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
‘ Determine which element of an option button control array was selected’ Returns -1 if no control has been selected’ Use : OptSelected = GetSelectedOption(Option1)Function GetSelectedOption(Opt As Object) As Integer
When you resize a ListView control (this happens automatically if the ListView is docked to the form, and the user resizes the form), it’s nice to have the last column
‘ This class does the owner drawing of a MenuItem to draw a color box.’ The class inherits from MenuItem, thus the ColorMenuItem objects’ can be added to a parent
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
‘ Not all fonts support the same styles. This function takes in ‘ input a font family and a font style, and returns a font style’ which is safe for
You can extract RGB values out of a 32-bit color value by using the integer division and the MOD operators, but there is a much more effective way, based on
‘ 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