CompactFrameworkではDroppedDownプロパティがサポートされていないのでAPIを使用します。
Dim isDroppedDown As boolean Dim cbo As ComboBox = Me.ComboBox1 If Api.SendMessage(cbo.Handle, Api.GETDROPPEDSTATE, 0, 0) = 1 Then isDroppedDown = True Else isDroppedDown = False End If
API
Public Class Api Public Const GETDROPPEDSTATE As Integer = &H157_ Public Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer End Function End Class
0 件のコメント:
コメントを投稿