Click here to Skip to main content
13,050,429 members (133,466 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 6 Sep 2011

Remote Desktop Mobile on VGA Devices: QVGA Applications Do Not Scale Well

, 6 Sep 2011
Rate this:
Please Sign up or sign in to vote.
Remote Desktop Mobile on VGA devices: QVGA applications do not scale well

There are now more and more full VGA rugged devices coming. And some customers are still using Remote Desktop Mobile to run their application on the small screens. Unfortunately, some of the coders use application screen layouts hard coded to QVGA (240×320). Now with a VGA capable Windows Mobile device, they get weird screens on the device.

The client (Remote Desktop Mobile) sends the server information about their screen sizes. As a VGA device can display 480×640 pixels, the hard coded 240×320 applications only use a quarter of the screen. The texts are very small and more or less unreadable.

The terminal server gets client resolution information:

Unscaled (left) VGA display of a QVGA application (with “Fit remote desktop to screen” NOT CHECKED) and on the right, the same application with internal autoadjust to workscreen size:

As you can see in the right image above this line, it is no problem to show a form designed for QVGA to scale nice with the use of some code (as using WorkingArea.Width/Height and a table layout). But in the left image, you see what happens to hard coded designed applications.

If you have the source code, you should change the design of your dialogs to be resolution aware, so it scales fine for QVGA and VGA (and whatever comes next).

If you do not have the code or cannot change the application, you have to tell Windows Mobile to behave like the Remote Desktop Mobile application is NOT HI_RES_AWARE. That means you need to hack the EXE file. I took a look at the Windows Mobile 6.5.3 wpctsc.exe (the Remote Desktop Mobile executable) and did not find the HI_RES_AWARE resource, so the OS must use the other mark to see that wpctsc.exe is HI_RES_AWARE. And yes, indeed, the PE header shows that wpctsc.exe has a subsystem version of 5.2. With some PEInfo tool, you can hack the major subsystem version and just change it from 5 to 4.

When you start an application that is not HI_RES_AWARE, the Windows Mobile 6.5.3 OS will scale all UI elements for the application and the app will look fine and not only fill a quarter of the VGA screen. After changing the major subsystem version number, the first thing you will notice is the more coarse display of the menu items in the menu bar:

On the left is the HI_RES_AWARE original app and on the right, we have the hacked one (take a closer look at the ellipses around the menu items).

When you use the hacked, not HI_RES_AWARE, application, the terminal server will see the client supports QVGA only (Client Resolution) and your hard coded application screens will look the same as on a QVGA capable device:

The attached wpctsc.exe is the hacked one with a subsystem major version number of 4 instead of 5. Use this on your Windows Mobile 6.5.3 device at your own risk. The file is not signed as the device I work with are not requiring signed EXE files. The change to the EXE file (after I dumped the OS files to my PC using itsutils) was simply done with mgeeky’s PEinfo code at GitHub.

If you cannot copy the file on top of the original one on the device (\Windows\wpctsc.exe), you can use the syscache feature. Copy the wpctsc.exe to \Windows\System\SysCache directory and reboot the device. If the directory does not exist, you just have to create it manually.

If you want to get the old wpctsc.exe back, just delete the file you copied. As the original wpctsc.exe is part of the OS (a XIP file), you cannot delete the file but you can copy a file with the same name on top of it. When you delete this copied file, the original is back in place. So, there is no harm in testing the EXE.



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Germany Germany
No Biography provided

You may also be interested in...

Comments and Discussions

Question320x320 resolution app Pin
codorno11-Mar-15 4:17
membercodorno11-Mar-15 4:17 
AnswerRe: 320x320 resolution app Pin
hjgode11-Mar-15 5:33
memberhjgode11-Mar-15 5:33 
QuestionQVGA in Citrix Receiver Pin
Member 252701031-Jul-12 9:46
memberMember 252701031-Jul-12 9:46 
AnswerRe: QVGA in Citrix Receiver Pin
hjgode31-Jul-12 18:06
memberhjgode31-Jul-12 18:06 
GeneralRe: QVGA in Citrix Receiver Pin
Member 25270101-Aug-12 9:54
memberMember 25270101-Aug-12 9:54 
QuestionQuestion about the trick Pin
zebra37-Jun-12 4:34
memberzebra37-Jun-12 4:34 
AnswerRe: Question about the trick Pin
hjgode7-Jun-12 7:38
memberhjgode7-Jun-12 7:38 
GeneralRe: Question about the trick Pin
zebra37-Jun-12 9:38
memberzebra37-Jun-12 9:38 
GeneralRe: Question about the trick Pin
zebra37-Jun-12 21:40
memberzebra37-Jun-12 21:40 
GeneralRe: Question about the trick Pin
hjgode8-Jun-12 7:55
memberhjgode8-Jun-12 7:55 
GeneralRe: Question about the trick Pin
zebra38-Jun-12 10:27
memberzebra38-Jun-12 10:27 
GeneralRe: Question about the trick Pin
zebra311-Jun-12 3:44
memberzebra311-Jun-12 3:44 
Hello Josef,

Here are some good news from my side. I have something working !!!

Let me explain you what happened. I told you that I had a display problem with your hacked version of RDM on a MOTOROLA MC65. I have tested on a MOTOROLA MC9190G and I don't have the problem any more.

For more details, I have prepared a composite picture with both devices : you can watch it HERE. On the left part of the picture you have what's happening on the MC9190G (everything is OK). On the right part, you have what's happenning on the MC65 with the size/stretch problem.
It seems that there is a problem in the graphics rendering engine on the MOTOROLA MC65.
But I don't care since my final aim is to have it working on the MC9190G. I used the MC65 just for testing because I did not have any MC9190G until today.

Let me thank you once again for sharing your precious knowledge and taking the time to read my requests.

All the best for you from France !!!!
GeneralRe: Question about the trick Pin
hjgode11-Jun-12 6:28
memberhjgode11-Jun-12 6:28 
GeneralRe: Question about the trick Pin
zebra311-Jun-12 21:10
memberzebra311-Jun-12 21:10 
QuestionQuestion Pin
hfd204924-Apr-12 3:41
memberhfd204924-Apr-12 3:41 
AnswerRe: Question Pin
hjgode24-Apr-12 6:47
memberhjgode24-Apr-12 6:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 6 Sep 2011
Article Copyright 2011 by hjgode
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid