Positioning Soft Input Panel - Windows CE

  • Thread starter Thread starter Omar Reyal via .NET 247
  • Start date Start date
O

Omar Reyal via .NET 247

(Type your message here)

--------------------------------
From: MOHR

Can anyone tell me how I can position the InputPanel control on the screen programatically, using vb.net. There doesnt seem to be any property I can use for this. I also would prefer to go with managed code.

Thanks.
 
You can control SIP by using 2 functions: GetSipInfo and SetSipInfo. Use
the first funciton to retrieve current information of SIP, then modify
top & bottom value for SIP Rectangle, set this structure with SetSipInfo:

' sets SIP to top of the screen
Dim sipInfo As SIPINFO = New SIPINFO
SipGetInfo(sipInfo)
sipInfo.rcSipRect.top = 0
sipInfo.rcSipRect.bottom = 80
SipSetInfo(sipInfo)

....


Private Class SIPINFO
Public Sub New()
cbSize=Marshal.SizeOf(GetType(SIPINFO))
End Sub

Public cbSize As Int32
Public fdwFlags As Int32
Public rcVisibleDesktop As RECT
Public rcSipRect As RECT
Public dwImDataSize As Int32
Public pvImData As Int32
End Class


Private Structure RECT
Public left As Int32
Public top As Int32
Public right As Int32
Public bottom As Int32
End Structure


<System.Runtime.InteropServices.DllImport("coredll.dll")> _
Private Shared Function SipGetInfo(ByVal sipInfo As SIPINFO) As Boolean
End Function
<System.Runtime.InteropServices.DllImport("coredll.dll")> _
Private Shared Function SipSetInfo(ByVal sipInfo As SIPINFO) As Boolean
End Function


Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
Back
Top