Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Mobile Device Emulator - Create Device with custom resolution

I am currently developing an application for a windows ce 6.0 device with Visual Studio 2008 and the Compact Framework 3.5.

The device itself has a resolution of 800x480 pixels.

Currently I am developing the app on the device itself which works great. However on the long run I can't ensure I have always access to the hardware (like today, I am working from home office) and I want to be able to use the device emulator.

I am usin a "Windows Mobile 5.0 R2" image which ships with the Microsoft Device emulator. Most of my forms are independent from the resolution and work out of the box on the 240x320px screen of the emulator.

However, there is one form that has a fixed resolution of 800x480 but I can't figure out how to modify or create an emulator (windows mobile or windows ce, it doesn't matter) with a predefined resolution.

Any help would be appreciated

like image 958
Jürgen Steinblock Avatar asked Jan 09 '12 16:01

Jürgen Steinblock


2 Answers

Open up Visual Studio, ensure the emulator is not running and then follow this "path"

  • Menu Tools->Options
  • Open Options Tree to DeviceTools -> Devices
  • Select your Emulator Device from the Devices list
  • Click 'Save As' and give it a name (e.g. NewRes)
  • Select your newly created device in the list
  • Click 'Properties'
  • Click 'Emulator Options'
  • Select the 'Display' tab
  • Change the Video settings to your desired resolution
  • Click 'OK' 3 times
  • Change your target device in your project to the new device
  • Deploy
  • Enjoy
like image 173
ctacke Avatar answered Nov 18 '22 08:11

ctacke


You can customizing device emulator machine configuration, by editing the associated decfg files.

To create decfg file in device emulator manager:

  • Select desired device configuration from Datastore (for example Windows Mobile 5.0 Pocket PC Emulator).
  • Connect to it (Right Click - Connect)
  • When device started, save machine configuration (Right Click - Save-As)
  • Give any name to the file (for example test.decfg), and save at the default location ("%USERPROFILE%\Documents\My Device Emulators")

At this point stop the emulator (Right click - Shutdown). Now you can edit the saved decfg file, contained all the emulated device parameters (memory, resolution, etc.).

You can start the new custom emulator from the Device Emulator Manager under the My Device Emulators section (see screen bellow).

Device Emulator Manager

Example decfg file content:

<?xml version="1.0"?>
<DeviceEmulator xmlns="http://schemas.microsoft.com/DeviceEmulator/2006/01/DeCfg">
    <Board>
        <CpuCore Reconfigurable="false">ARMv4</CpuCore>
        <CpuOptions Reconfigurable="false">TDI</CpuOptions>
        <VFP Reconfigurable="false">false</VFP>
        <OSImage Reconfigurable="false" Address="0">C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\DeviceEmulation\0409\PPC_USA.bin</OSImage>
        <MemSize Reconfigurable="false">128</MemSize>
    </Board>
    <Emulator>
        <DefaultSave Reconfigurable="false">true</DefaultSave>
        <FuncKey Reconfigurable="true">193</FuncKey>
        <HostKey Reconfigurable="true">Right-Alt</HostKey>
        <Language Reconfigurable="false">1033</Language>
        <VMID Reconfigurable="false">{812DA9C7-D9F2-4C57-85CD-29A7ED08C20B}</VMID>
        <Video Reconfigurable="false" Width="400" Height="234" BitsPerPixel="16"/>
    </Emulator>
    <Peripherals>
        <SerialPort Reconfigurable="true" UARTNumber="0">none</SerialPort>
        <SerialPort Reconfigurable="true" UARTNumber="1">none</SerialPort>
        <SerialPort Reconfigurable="true" UARTNumber="2">none</SerialPort>
    </Peripherals>
    <Platform>Windows Mobile 5.0 Pocket PC SDK</Platform>
</DeviceEmulator>
like image 36
voji Avatar answered Nov 18 '22 08:11

voji