input panel error on emulator

M

Milsnips

hi there,

i have an application i created, and i added the inputPanel control to the
form. when the user moves focus around the form, i set the
enabled=true/false accordingly, which all works fine when testing on the
pda, but the same code on the emulator crashes with an exception in the
following scenario:

PocketPC2002 Emulator

form is open, and the inputpanel is displaying
menuitem1 - has the code "me.close", when this is clicked it crashes.

Can anyone else confirm this or is it some bug in the emulator doing this?

thanks,
 
M

Milsnips

Hi Daniel,

i installed the CF.NET sp3, and the problem still occurs which leads me to
believe it is a bug.

CF.NET Version installed on emulator is :

this is the code that causes the problem....
---------------------------------------------------

Public Class frmErrorTest

Inherits System.Windows.Forms.Form



#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 Label1 As System.Windows.Forms.Label

Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox

Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu

Friend WithEvents mnuBack As System.Windows.Forms.MenuItem

Friend WithEvents btnSearch As System.Windows.Forms.Button

Friend WithEvents ipCustomers As Microsoft.WindowsCE.Forms.InputPanel

Friend WithEvents txtSearch As System.Windows.Forms.TextBox

Friend WithEvents btnContinue As System.Windows.Forms.Button

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

Me.Label1 = New System.Windows.Forms.Label

Me.PictureBox1 = New System.Windows.Forms.PictureBox

Me.MainMenu1 = New System.Windows.Forms.MainMenu

Me.mnuBack = New System.Windows.Forms.MenuItem

Me.txtSearch = New System.Windows.Forms.TextBox

Me.btnSearch = New System.Windows.Forms.Button

Me.ipCustomers = New Microsoft.WindowsCE.Forms.InputPanel

Me.btnContinue = New System.Windows.Forms.Button

'

'Label1

'

Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!,
System.Drawing.FontStyle.Bold)

Me.Label1.Location = New System.Drawing.Point(36, 2)

Me.Label1.Size = New System.Drawing.Size(200, 18)

Me.Label1.Text = "test"

Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter

'

'PictureBox1

'

Me.PictureBox1.Location = New System.Drawing.Point(4, 0)

Me.PictureBox1.Size = New System.Drawing.Size(32, 20)

'

'MainMenu1

'

Me.MainMenu1.MenuItems.Add(Me.mnuBack)

'

'mnuBack

'

Me.mnuBack.Text = "back"

'

'txtSearch

'

Me.txtSearch.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!,
System.Drawing.FontStyle.Regular)

Me.txtSearch.Location = New System.Drawing.Point(4, 22)

Me.txtSearch.Size = New System.Drawing.Size(158, 24)

Me.txtSearch.Text = "ple"

'

'btnSearch

'

Me.btnSearch.Location = New System.Drawing.Point(164, 22)

Me.btnSearch.Size = New System.Drawing.Size(72, 22)

Me.btnSearch.Text = "test"

'

'btnContinue

'

Me.btnContinue.Location = New System.Drawing.Point(146, 246)

Me.btnContinue.Size = New System.Drawing.Size(90, 20)

Me.btnContinue.Text = "test"

'

'frmCustomers

'

Me.ClientSize = New System.Drawing.Size(242, 269)

Me.ControlBox = False

Me.Controls.Add(Me.btnContinue)

Me.Controls.Add(Me.btnSearch)

Me.Controls.Add(Me.txtSearch)

Me.Controls.Add(Me.Label1)

Me.Controls.Add(Me.PictureBox1)

Me.Menu = Me.MainMenu1

Me.Text = "test"

End Sub

#End Region

Private Sub frmCustomers_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

txtSearch.Focus()

End Sub

Private Sub mnuBack_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuBack.Click

Me.Close()

End Sub

Private Sub txtSearch_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtSearch.LostFocus

ipCustomers.Enabled = False

End Sub

Private Sub txtSearch_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtSearch.GotFocus

ipCustomers.Enabled = True

End Sub



End Class
 
S

Sergey Bogdanov

Is it WindowsCE 4.1 emulator that comes with VS.NET? If so, it doesn't
support InputPanel.
 
M

Milsnips

yep it says Emulator version 4.1.0 (build 14)

the inputpanel works fine in the emulator, its only when i close down the
form it returns this error.

thanks,
Paul

Sergey Bogdanov said:
Is it WindowsCE 4.1 emulator that comes with VS.NET? If so, it doesn't
support InputPanel.

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

Hi Daniel,

i installed the CF.NET sp3, and the problem still occurs which leads me
to
believe it is a bug.

CF.NET Version installed on emulator is :

this is the code that causes the problem....
---------------------------------------------------

Public Class frmErrorTest

Inherits System.Windows.Forms.Form



#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 Label1 As System.Windows.Forms.Label

Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox

Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu

Friend WithEvents mnuBack As System.Windows.Forms.MenuItem

Friend WithEvents btnSearch As System.Windows.Forms.Button

Friend WithEvents ipCustomers As Microsoft.WindowsCE.Forms.InputPanel

Friend WithEvents txtSearch As System.Windows.Forms.TextBox

Friend WithEvents btnContinue As System.Windows.Forms.Button

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

Me.Label1 = New System.Windows.Forms.Label

Me.PictureBox1 = New System.Windows.Forms.PictureBox

Me.MainMenu1 = New System.Windows.Forms.MainMenu

Me.mnuBack = New System.Windows.Forms.MenuItem

Me.txtSearch = New System.Windows.Forms.TextBox

Me.btnSearch = New System.Windows.Forms.Button

Me.ipCustomers = New Microsoft.WindowsCE.Forms.InputPanel

Me.btnContinue = New System.Windows.Forms.Button

'

'Label1

'

Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!,
System.Drawing.FontStyle.Bold)

Me.Label1.Location = New System.Drawing.Point(36, 2)

Me.Label1.Size = New System.Drawing.Size(200, 18)

Me.Label1.Text = "test"

Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter

'

'PictureBox1

'

Me.PictureBox1.Location = New System.Drawing.Point(4, 0)

Me.PictureBox1.Size = New System.Drawing.Size(32, 20)

'

'MainMenu1

'

Me.MainMenu1.MenuItems.Add(Me.mnuBack)

'

'mnuBack

'

Me.mnuBack.Text = "back"

'

'txtSearch

'

Me.txtSearch.Font = New System.Drawing.Font("Microsoft Sans Serif",
11.0!, System.Drawing.FontStyle.Regular)

Me.txtSearch.Location = New System.Drawing.Point(4, 22)

Me.txtSearch.Size = New System.Drawing.Size(158, 24)

Me.txtSearch.Text = "ple"

'

'btnSearch

'

Me.btnSearch.Location = New System.Drawing.Point(164, 22)

Me.btnSearch.Size = New System.Drawing.Size(72, 22)

Me.btnSearch.Text = "test"

'

'btnContinue

'

Me.btnContinue.Location = New System.Drawing.Point(146, 246)

Me.btnContinue.Size = New System.Drawing.Size(90, 20)

Me.btnContinue.Text = "test"

'

'frmCustomers

'

Me.ClientSize = New System.Drawing.Size(242, 269)

Me.ControlBox = False

Me.Controls.Add(Me.btnContinue)

Me.Controls.Add(Me.btnSearch)

Me.Controls.Add(Me.txtSearch)

Me.Controls.Add(Me.Label1)

Me.Controls.Add(Me.PictureBox1)

Me.Menu = Me.MainMenu1

Me.Text = "test"

End Sub

#End Region

Private Sub frmCustomers_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

txtSearch.Focus()

End Sub

Private Sub mnuBack_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuBack.Click

Me.Close()

End Sub

Private Sub txtSearch_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtSearch.LostFocus

ipCustomers.Enabled = False

End Sub

Private Sub txtSearch_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtSearch.GotFocus

ipCustomers.Enabled = True

End Sub



End Class
 
S

Sergey Bogdanov

Um... what is the title of the emulator window. It's "PocketPC 200x",
isn't it?

Nevermind, just tested your code with PocketPC 2002, PocketPC 2003
emulators and it works normally. Follow Daniel's suggestion how to
detect that your emulator has the SP3.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

InputPanel and WinCE 3
Input Panel 1
Create platform dependent objects 1
Inputpanel Exception 3
Input Panel 1
InputPanel 2
error while deploying application on emulator 3
Screwball emulator issue? 1

Top