G
Guest
Greetings,
My PDA has PPC 2003 OS. Since it does not natively support Arabic, i am in a
need to show all the controls as Right-to-left arrangment. I am trying to do
it for a combo box.
<StructLayout(LayoutKind.Sequential)> _
Public Structure COMBOBOXINFO
Dim cbSize As Integer
Dim rcItem As Rectangle
Dim rcButton As Rectangle
Dim stateButton As ComboBoxButtonState
Dim hwndCombo As IntPtr
Dim hwndItem As IntPtr
Dim hwndList As IntPtr
End Structure
Public Enum ComboBoxButtonState
STATE_SYSTEM_NONE = 0
STATE_SYSTEM_INVISIBLE = &H8000
STATE_SYSTEM_PRESSED = &H8
End Enum
<DllImport("coredll")> _
Private Shared Function GetCapture() As IntPtr
End Function
<DllImport("coredll", EntryPoint:="SendMessageW")> _
Public Shared Function SendMessageString(ByVal hwnd As IntPtr, _
ByVal wMsg As Integer, _
ByVal wParam As IntPtr, _
ByRef lParam As COMBOBOXINFO) As Integer
End Function
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
Dim stInpPtr As New IntPtr(0)
Dim cbi As New COMBOBOXINFO
Dim temp
Try
ComboBox1.Capture = True
Dim hwndow As IntPtr = GetCapture()
ComboBox1.Capture = False
Dim chldHandle As IntPtr = GetWindow(hwndow, GW_CHILD)
cbi.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cbi)
SendMessageString(hwndow, CB_GETCOMBOBOXINFO, stInpPtr, cbi)
The function executes without any errors. But the cbi (object of
COMBOBOXINFO) has all values as zero. Where am i going wrong.
Or is there a better way to do this.
I tried getComboBoxInfor (alternat). that gives me a missing method exception.
<DllImport("coredll")> _
Public Shared Function GetComboBoxInfo(ByVal hwnd As IntPtr, ByRef pcbi
As COMBOBOXINFO) As Boolean
End Function
Thanks in advance,
Boris
My PDA has PPC 2003 OS. Since it does not natively support Arabic, i am in a
need to show all the controls as Right-to-left arrangment. I am trying to do
it for a combo box.
<StructLayout(LayoutKind.Sequential)> _
Public Structure COMBOBOXINFO
Dim cbSize As Integer
Dim rcItem As Rectangle
Dim rcButton As Rectangle
Dim stateButton As ComboBoxButtonState
Dim hwndCombo As IntPtr
Dim hwndItem As IntPtr
Dim hwndList As IntPtr
End Structure
Public Enum ComboBoxButtonState
STATE_SYSTEM_NONE = 0
STATE_SYSTEM_INVISIBLE = &H8000
STATE_SYSTEM_PRESSED = &H8
End Enum
<DllImport("coredll")> _
Private Shared Function GetCapture() As IntPtr
End Function
<DllImport("coredll", EntryPoint:="SendMessageW")> _
Public Shared Function SendMessageString(ByVal hwnd As IntPtr, _
ByVal wMsg As Integer, _
ByVal wParam As IntPtr, _
ByRef lParam As COMBOBOXINFO) As Integer
End Function
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
Dim stInpPtr As New IntPtr(0)
Dim cbi As New COMBOBOXINFO
Dim temp
Try
ComboBox1.Capture = True
Dim hwndow As IntPtr = GetCapture()
ComboBox1.Capture = False
Dim chldHandle As IntPtr = GetWindow(hwndow, GW_CHILD)
cbi.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cbi)
SendMessageString(hwndow, CB_GETCOMBOBOXINFO, stInpPtr, cbi)
The function executes without any errors. But the cbi (object of
COMBOBOXINFO) has all values as zero. Where am i going wrong.
Or is there a better way to do this.
I tried getComboBoxInfor (alternat). that gives me a missing method exception.
<DllImport("coredll")> _
Public Shared Function GetComboBoxInfo(ByVal hwnd As IntPtr, ByRef pcbi
As COMBOBOXINFO) As Boolean
End Function
Thanks in advance,
Boris