John D Wilson

I have a bizarre problem;

When my CF2.0 app runs, the built in device contacts (phonebook) list goes blank.

This happens on the four seperate device make/models I have tested this on (Model / Manufacturer can be provided if anyone thinks it's relevant)

As far as I can tell it seems to be something to do with the references in my application which reads like a bit of shopping list (found at the bottom of the post)

If I build a very simple "Hello World" App, the contacts list remains but as soon as the first form loads in my own app, the contacts list empties.

Has anyone else experienced this bug or my plan of attack is to extend the Hello World App one reference at time and a couple of benign lines of code to do something in each particular dll.

'// List of References in the Application

Microsoft.WindowsCE.Forms
Microsoft.WindowsMobile.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Microsoft.WindowsMobile.Telephony, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
OpenNETCF.Windows.Forms, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e60dbea84bb431b7,
Resco.AdvancedList.CF2, Version=5.2.0.0, Culture=neutral, PublicKeyToken=7444f602060105f9,
Resco.AdvancedTree.CF2, Version=5.3.0.0, Culture=neutral, PublicKeyToken=7444f602060105f9,
Resco.SmartGrid.CF2, Version=5.2.0.0, Culture=neutral, PublicKeyToken=7444f602060105f9,
System
System.Data
System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3,
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac,
System.Web.Services
System.Windows.Forms
System.Windows.Forms.DataGrid
System.XML




Re: Smart Devices General WM 5.0 - Contacts Disappear When Running a Compact Framework 2.0 Application

Guang-Ming Bian - MSFT

Hi John D Wilson,

I suggest you develop a simple project without any reference and check whether the problem happens. If it doesn't happen, you add a one of your references and check again until you find which reference does it.

If you find the reference, can you please show me your code related to the reference.

Best regards,

Guang-Ming Bian - MSFT






Re: Smart Devices General WM 5.0 - Contacts Disappear When Running a Compact Framework 2.0 Application

John D Wilson

That's exactly what I will be trying over the weekend, thanks for your suggestion; it is what I was going to try next anyway but wanted to check no-one else was having the same problem before I went digging






Re: Smart Devices General WM 5.0 - Contacts Disappear When Running a Compact Framework 2.0 Application

John D Wilson

Code Block

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim startTime As Date = Now

Me.Button1.Text = "Running"

While DateDiff(DateInterval.Second, startTime, Now) < 60

Application.DoEvents()

End While

Me.Button1.Text = "Complete"

End Sub

The Code above is the basis of the problem as Implemented in a Whitepaper (Which incidently was based on Compact Framework 1.0).

Creating a Multiple Form Application Framework for the Microsoft .NET Compact Framework

See FormStack.Run();

The DoEvents Method seems to prevent the contacts list from refreshing as I have noticed the selection highlight still works in the contact form but no text displays.

Th code in my app will now be changed.