本文整理匯總了VB.NET中System.Windows.Forms.OSFeature.IsPresent方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET OSFeature.IsPresent方法的具體用法?VB.NET OSFeature.IsPresent怎麽用?VB.NET OSFeature.IsPresent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.OSFeature
的用法示例。
在下文中一共展示了OSFeature.IsPresent方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1:
' 導入命名空間
Imports System.Drawing
Imports System.ComponentModel
Imports System.Windows.Forms
示例2: GetCaretWidth
' Gets the caret width based upon the operating system or default value.
Private Function GetCaretWidth() As Integer
' Check to see if the operating system supports the caret width metric.
If OSFeature.IsPresent(SystemParameter.CaretWidthMetric) Then
' If the operating system supports this metric,
' return the value for the caret width metric.
Return SystemInformation.CaretWidth
Else
' If the operating system does not support this metric,
' return a custom default value for the caret width.
Return 1
End If
End Function