本文整理匯總了VB.NET中Microsoft.VisualBasic.ErrObject.LastDllError屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET ErrObject.LastDllError屬性的具體用法?VB.NET ErrObject.LastDllError怎麽用?VB.NET ErrObject.LastDllError使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。
在下文中一共展示了ErrObject.LastDllError屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1:
Public Structure RECT
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
End Structure
示例2:
Const ERROR_INVALID_WINDOW_HANDLE As Long = 1400
Const ERROR_INVALID_WINDOW_HANDLE_DESCR As String =
"Invalid window handle."
示例3: PrintWindowCoordinates
Private Sub PrintWindowCoordinates(ByVal hwnd As Integer)
' Prints left, right, top, and bottom positions
' of a window in pixels.
Dim rectWindow As RECT
' Pass in window handle and empty the data structure.
' If function returns 0, an error occurred.
If GetWindowRect(hwnd, rectWindow) = 0 Then
' Check LastDllError and display a dialog box if the error
' occurred because an invalid handle was passed.
If Err.LastDllError = ERROR_INVALID_WINDOW_HANDLE Then
MsgBox(ERROR_INVALID_WINDOW_HANDLE_DESCR, Title:="Error!")
End If
Else
Debug.Print(rectWindow.Bottom)
Debug.Print(rectWindow.Left)
Debug.Print(rectWindow.Right)
Debug.Print(rectWindow.Top)
End If
End Sub