rbpart4
asked on
Software based input panel (soft keyboard on WinCE 4.0) .NET programming
Below is the code I have written to test showing the soft keyboard and then to hide it when done "typing" in the text box. However I get an error in the code when running on the device on this line "Showkeyboard = SipShowIM(1)". Thanks for the help.
Public Class test
Inherits System.Windows.Forms.Form
Friend WithEvents Button1 As System.Windows.Forms.Butto n
Friend WithEvents Button2 As System.Windows.Forms.Butto n
Declare Function SipShowIM Lib "coredll" (ByVal flags As Long) As Long
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
MyBase.Dispose(disposing)
End Sub
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents TextBox1 As System.Windows.Forms.TextB ox
<System.Diagnostics.Debugg erStepThro ugh()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Butto n
Me.Button2 = New System.Windows.Forms.Butto n
Me.TextBox1 = New System.Windows.Forms.TextB ox
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(32, 56)
Me.Button1.Size = New System.Drawing.Size(64, 24)
Me.Button1.Text = "Keybd on"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(32, 88)
Me.Button2.Size = New System.Drawing.Size(64, 24)
Me.Button2.Text = "Keybd off"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 16)
Me.TextBox1.Size = New System.Drawing.Size(96, 22)
Me.TextBox1.Text = ""
'
'test
'
Me.ClientSize = New System.Drawing.Size(244, 274)
Me.Controls.Add(Me.TextBox 1)
Me.Controls.Add(Me.Button2 )
Me.Controls.Add(Me.Button1 )
Me.Text = "test"
End Sub
#End Region
Private Function Showkeyboard() As Long
Showkeyboard = SipShowIM(1)
End Function
Private Function Hidekeyboard() As Long
Hidekeyboard = SipShowIM(0)
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Showkeyboard()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Hidekeyboard()
End Sub
End Class
Public Class test
Inherits System.Windows.Forms.Form
Friend WithEvents Button1 As System.Windows.Forms.Butto
Friend WithEvents Button2 As System.Windows.Forms.Butto
Declare Function SipShowIM Lib "coredll" (ByVal flags As Long) As Long
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
MyBase.Dispose(disposing)
End Sub
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents TextBox1 As System.Windows.Forms.TextB
<System.Diagnostics.Debugg
Me.Button1 = New System.Windows.Forms.Butto
Me.Button2 = New System.Windows.Forms.Butto
Me.TextBox1 = New System.Windows.Forms.TextB
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(32, 56)
Me.Button1.Size = New System.Drawing.Size(64, 24)
Me.Button1.Text = "Keybd on"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(32, 88)
Me.Button2.Size = New System.Drawing.Size(64, 24)
Me.Button2.Text = "Keybd off"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 16)
Me.TextBox1.Size = New System.Drawing.Size(96, 22)
Me.TextBox1.Text = ""
'
'test
'
Me.ClientSize = New System.Drawing.Size(244, 274)
Me.Controls.Add(Me.TextBox
Me.Controls.Add(Me.Button2
Me.Controls.Add(Me.Button1
Me.Text = "test"
End Sub
#End Region
Private Function Showkeyboard() As Long
Showkeyboard = SipShowIM(1)
End Function
Private Function Hidekeyboard() As Long
Hidekeyboard = SipShowIM(0)
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Showkeyboard()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Hidekeyboard()
End Sub
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.