请教:我设置了开机密码但是无法弹出软键盘

qty0   2011-7-28 20:17 楼主

我设置了开机密码但是无法弹出软键盘,这样没办法进入系统也没办法关机,请教如何关闭密码或者调出软键盘

是windows CE6.0的

谢谢各位大大了!

[ 本帖最后由 qty0 于 2011-7-28 20:21 编辑 ]

回复评论 (1)

  1. Imports System.Runtime.InteropServices
    Public Class SipClass
    #Region "API"
        <DllImport("coredll.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> _
        Private Shared Function SipShowIM(ByVal dwFlag As SIPStatus) As Integer
        End Function
        <DllImport("coredll.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> _
        Private Shared Function SipSetInfo(ByRef pSipInfo As SIPINFO) As Boolean
        End Function
        <DllImport("coredll.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> _
        Private Shared Function SipGetInfo(ByRef pSipInfo As SIPINFO) As Boolean
        End Function
    #End Region
    #Region "枚举"
        Private Enum SIPStatus
            SIPF_OFF = 0
            SIPF_ON
        End Enum
    #End Region
    #Region "结构"
        Private Structure SIPINFO
            Public CbSize As Integer
            Public FdwFlags As SIPStatus
            Public RcVisibleDesktop As RECT
            Public RcSipRect As RECT
            Public DwImDataSize As Integer
            Public PvImData As Integer
        End Structure
        Private Structure RECT
            Public Left As Integer
            Public Top As Integer
            Public Right As Integer
            Public Bottom As Integer
            Public ReadOnly Property Width() As Integer
                Get
                    Return Right - Left
                End Get
            End Property
            Public ReadOnly Property Height() As Integer
                Get
                    Return Bottom - Top
                End Get
            End Property
        End Structure
    #End Region
    #Region "公共方法"
        ''' <summary>
        ''' 显示输入面板
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared Function Show() As Boolean
            Return SipShowIM(SIPStatus.SIPF_ON)
        End Function
        ''' <summary>
        ''' 影藏输入面板
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared Function Hide() As Boolean
            Return SipShowIM(SIPStatus.SIPF_OFF)
        End Function
        ''' <summary>
        ''' 显示输入面板,并设定面板的位置
        ''' </summary>
        ''' <param name="Location"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Shared Function SetPosition(ByVal Location As Point) As Boolean
            Dim mySi As SIPINFO
            mySi.CbSize = Marshal.SizeOf(GetType(SIPINFO))
            Call SipGetInfo(mySi)
            mySi.RcSipRect.Top = Location.Y
            mySi.RcSipRect.Bottom = Location.Y + mySi.RcSipRect.Height
            mySi.RcSipRect.Left = Location.X
            mySi.RcSipRect.Right = Location.X + mySi.RcSipRect.Width
            mySi.FdwFlags = SIPStatus.SIPF_ON
            Return SipSetInfo(mySi)
        End Function
    #End Region
    End Class

点赞  2011-9-7 09:30
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复