locked
Developing for standard and professional RRS feed

  • Question

  • I am new to windows mobile development. Basically I have 2 projects. One for standard and one for professional. What I want to do is probably add a class or something that runs first that determines which platform it is and then execute the correct project. Any help would be appreciated.
    Alan
    Wednesday, September 22, 2010 8:26 AM

Answers

All replies

  • Hi ,

    You need developed a  console application ,  which will be executed  first ,

    in this project check the is it pocket pc or smart phone using  api GetVersionEx() ,

    according to  result  launch the pocketpc/smartphone .exe(executable )  using

    ShellExecute()  method .

    Regards,

    Ashakant 

    • Proposed as answer by matrixlnmi Wednesday, September 22, 2010 5:04 PM
    Wednesday, September 22, 2010 3:06 PM
  • I am using VB and I tried getversionex and can't figure out how to get it to work.
    Alan
    Wednesday, September 22, 2010 3:12 PM
  •  

    Hi ,

    As per suugestion mention above , given below is yours queries :

    How to get the OSversion in VB can  be  found in the below url :

    http://www.vb-helper.com/howto_os_version.html

    and after that  how  to  launch the application is can be  found in the  url :

    http://www.vbaccelerator.com/codelib/shell/shellex.htm

    Both  url  provide the sample code also  which can be useful f o r you .

    Regards,

    Ashakant

     

    • Proposed as answer by matrixlnmi Wednesday, September 22, 2010 5:03 PM
    Wednesday, September 22, 2010 5:03 PM
  • The following FAQ can help you differentiate Pocket PC from Smartphone:

    How do I detect the platform and Windows Mobile version?


    Please mark the post that helps you, and unmark that does not. This benefits our community.

    • Marked as answer by warrentang Wednesday, September 29, 2010 3:06 AM
    Friday, September 24, 2010 3:36 AM
  • Hi,

    Select Windows CE while selecting the project type under smart device project. So that project will be compatible for both(professional and standard) platforms.  If you already developed it click on project and change platform to windows CE.

    Here is the code to know the platform type:

    http://social.msdn.microsoft.com/forums/en-us/vssmartdevicesvbcs/thread/7F05CCCF-8E93-447E-AD36-683909E55B6D

    Please let me know if you my understanding is wrong regarding your query.

    Regards,

    Malleswar

     

    • Marked as answer by warrentang Wednesday, September 29, 2010 3:05 AM
    • Unmarked as answer by warrentang Wednesday, September 29, 2010 3:06 AM
    Friday, September 24, 2010 4:51 AM
  • Ok. I got it to work with the following code. But I have another problem. My app is a very simple app. I want it to work on PPC2003 and smartphones. I have 2 different forms for standard and professional. Now the problem is that if I use .net compact framework 3.5 then the device has to have that installed. So if I want to the app to work on older devices it won't work without the .net compact framework. If I use .net compact framework 2.0 then I lose the ability to use the code to determine if its standard or professional. I was hoping there was a way to include the 3.5 CF into my app cab but I haven't seen it. I am currently using VS2008 whcih only allows you 2.0 CF and 3.5 CF. I was thinking about using VS2005 and use 1.0 CF so it would work on all Windows mobile devices. But then I would again lose the ability to use the code. Any ideas would be appreciated.

     

    Shared Sub Main()

     

    Dim Platform As New WinCEPlatform()

    Platform = SystemSettings.Platform

     

    If Platform = "1" Then

    Application.Run(

    New Pro())

     

    ElseIf Platform = "2" Then

    Application.Run(

    New Standard())

     

    End If

     

    End Sub


    Alan
    Saturday, September 25, 2010 5:28 PM
  • Using VS2005 I started a new project and selected SmartDevice 1.0. Now I have some issues.
    1. Trying to determine either standard or professional. I am trying to use the Pinvoke to do this. No luck so far. I get an error on ByVal nFolder As ceFolders.
    2. The code I was using to play a .wav file no longer works.
            Dim myplayer As New System.Media.SoundPlayer(New IO.MemoryStream(My.Resources.Dice))
            myplayer.Play()
    3. I had resource files for images and a wav file so my code to use these no longer work.
    Me.PictureBox1.Image = My.Resources.red_die_1_th
    Alan
    Sunday, September 26, 2010 8:58 AM
  • You can redistribute .NET Compact Framework with your application, so that it can be installed on the devices that do not have it. More information is available in the following FAQ: 
     How do I redistribute .NET CF with my CAB and install it when it’s not present on the device? 

    .NET CF 1.0 has been discontinued so I would not suggest that you use it. Besides you don't seem to be good at P/Invoke, which would be required as a result of the lack of some APIs in .NET CF 1.0. If you use .NET CF 3.5, some legacy devices are not supported. Nevertheless I believe few of them are still on the market.

    In a word, you have a compromise to make. The following page is for your reference:
    Devices and Platforms Supported by the .NET Compact Framework  
     


    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by warrentang Wednesday, September 29, 2010 3:04 AM
    Monday, September 27, 2010 2:24 AM
  • Aren't there different .net cf 3.5 cabs? One for standard and one for professional? If so I guess that means I would have to include both cabs in the cab file and then write something that would detect which one to install.
    Alan
    Wednesday, September 29, 2010 9:18 PM
  • The cab is the same for Windows Mobile 5/6 Standard and Professional. The location is: 

    %Program Files%\Microsoft.NET\SDK\CompactFramework\v3.5\windowsce\NETCFv35.wm.ARMV4I.cab

    Another cab is needed to display error messages. It is still the same for WM 5/6 Std. and Pro: 

    %Program Files%\Microsoft.NET\SDK\CompactFramework\v3.5\windowsce\diagnostics\NETCFv35.Messages.EN.wm.cab 

     

    For PPC2003, the cabs are "NETCFv35.ppc.armv4.cab" and "NETCFv35.Messages.EN.cab" respectively in the same folder.

     


    Please mark the post that helps you, and unmark that does not. This benefits our community.
    Thursday, September 30, 2010 3:15 AM
  • So you are saying I have to include 4 cab files not including the cab for my app?
    Alan
    Thursday, September 30, 2010 10:11 AM
  • And what about older standard smartphones?
    Alan
    Thursday, September 30, 2010 10:20 AM