[Q] Visual Studio 2008 - Windows Mobile Software Development

Hi,
I make my first steps for Windows Mobile dev.
I'm using Visual Studio 2008 with 3.5 .NET Framework and Windows Mobile 6 SDK.
I'm using a HTC HD2.
I have two Questions:
1:
The resolution of my HTC HD2 ist 480x800px. When I enter 480;800 as Form-size and select "none" for AutoScaleMode, my controls and everything gets messed up. The controls get resized, the form is too large etc...
Why does this happen?
2:
How can I apply the HTC HD2 skin for the "skin" in the Visual Studio 2008 Desig-Window?

1:
The resolution of my HTC HD2 ist 480x800px. When I enter 480;800 as Form-size and select "none" for AutoScaleMode, my controls and everything gets messed up. The controls get resized, the form is too large etc...
Why does this happen?
Click to expand...
Click to collapse
To develop for higher resolution screens try the 6.5.3 DTK.
This article may help
http://www.davidmillington.net/news/index.php/2010/06/18/windows-mobile-6-5-3-dtk-in-visual-studio-2008
2:
How can I apply the HTC HD2 skin for the "skin" in the Visual Studio 2008 Desig-Window?
Click to expand...
Click to collapse
You can't as far as I'm aware. This skin you see in the designer is just a made up one by Microsoft.

1: Download and install Windows Mobile 6.5 Developer Tool Kit
for a WVGA emulator!
2: Search this forum there are some Sense SDKs (e.g. Sense Interface SDK by eboelzner)
not the skin in the designer but in the app

If you examine the ClientSize property of a .NET standard form, on such a device, you will find that the system by default treats the area as 240x400 not 480x800, and smooths/renders objects to fit it.
The client area is the 'white' area of the screen. The 'Height' of the client area reported in the ClientSize object is just less than 400 as the Start Bar and the Menu Bar have been excluded.
When the orientation changes, so will these values.

THanks that helped a lot. I'm just trying it.

Related

How HTC developed Sense UI

I was wondering how HTC has created Sense UI?
I would like to code some apps with a "modern" UI, so custom buttons, ... like the controls we can see in Sense.
On one side, I have a Silvermoon-like solution, using .NET and OpenGL. But in this case, I lost the design time features (i.e. rendering the control when I drop it on a form in Visual Studio).
I guess HTC has developed Sense in native. I have some knowledge in Win32 and I'm not too bad in C/C++ programming. But I'm wondering how you develop custom controls in native? Can you benefit from some design-time rendering? Any information about how Sense is coded and native controls programming is welcome...
Edit: for example, the Sense buttons, are they using images or custom drawing?
I don't know anything about the way Sense was developed but native control programming doesn't allow design-time rendering. You have to create your own controls during runtime. So for example if you want to have something like the tabs in TF3D then you have to take a native tab control and overwrite the paint method to draw the background and add pictures on it, manage finger gestures to switch tabs etc. Something along that way. I usually prefer native Win32 programming but if you're doing such GUI things and need a quick solution it might be better using an already existing .NET library, like i.e. the mentioned Silvermoon.
Manila SDK
Hello,
Search ManilaSDK in this forum. It's a set of .net controls that fit Manila looking. On my side, I'm trying to develop another set of controls that will be more "skinnable"
Kridek said:
Hello,
Search ManilaSDK in this forum. It's a set of .net controls that fit Manila looking. On my side, I'm trying to develop another set of controls that will be more "skinnable"
Click to expand...
Click to collapse
i think he's talkin about htc sense on android, not on wm!
screw-you-guys said:
i think he's talkin about htc sense on android, not on wm!
Click to expand...
Click to collapse
and thats why he went into the windows development thread and not the android thread ?
He means WM of course
i heard that sense is written in lua as is tf3d

Code with Visual Studio 2008 for WM 6 in VGA and WVGA

HI there,
I would like to start coding for Windows Mobile 6 with Visual Studio 2008. But when I start a new project "Intelligent Device" - I get the picture of a pocket pc with 240*480 px and I can only use the WM 5 emulator.
I already installed the Microsoft WM 6 Prof. SDK, but nothing changed in my Visual Studio 2008 installation.
How can I start coding for VGA and WVGA devices? Could you please help me little out.
I think I fixed it by uninstalling and reinstalling VS2008, maybe you can try that? It was a long time ago so I don't really remember, sorry.
lamajstro said:
HI there,
I would like to start coding for Windows Mobile 6 with Visual Studio 2008. But when I start a new project "Intelligent Device" - I get the picture of a pocket pc with 240*480 px and I can only use the WM 5 emulator.
I already installed the Microsoft WM 6 Prof. SDK, but nothing changed in my Visual Studio 2008 installation.
How can I start coding for VGA and WVGA devices? Could you please help me little out.
Click to expand...
Click to collapse
after u create a smart device project, hit project/change target platform and select a WM6 version

Simple Cube Programming

Hello XDA-DEV Community,
Yesterday I played a game card game called Munchkin, but we also needed a simple 6 sided cube. The Cube was missing, and so I decided to create my windows mobile cube
I want the Cube to rotate, when the mobile phone is shaking.
My thought was to create a gif with 6 frames (1-6). When the event "shaking" (defined by G-Sensor) triggers, the gif should jump to a random frame.
My question is: how do you jump to a frame? I use Visual Studio 2008 with Windows Mobile 6 Professional SDK and compact framework 3.5. My first thought was to insert the gif into an picturebox. But now i stuck.
Greetings,
muh2k4
P.S.: I use a HTC Touch HD with Windows Mobile 6.5 and Milina.
Excuse my language, please!
muh2k4 said:
My thought was to create a gif with 6 frames (1-6). When the event "shaking" (defined by G-Sensor) triggers, the gif should jump to a random frame.
My question is: how do you jump to a frame? I use Visual Studio 2008 with Windows Mobile 6 Professional SDK and compact framework 3.5. My first thought was to insert the gif into an picturebox. But now i stuck.
Click to expand...
Click to collapse
When I've done similar things for Windows (not mobile), I've used separate images and changed which one is shown in the picture box. I'm not sure there is a way to pick the frame of the GIF. If you use a PNG, it should still be small enough to not be a noticeable difference in file size (if you're concerned about that).
As an alternative, you could possibly use the trick that web designers use. You make one big image, that's 6 times as wide, that has the content of all 6 individual "frames". Then, you move the image in the box so that only one of the "frames" show as needed.
Why not just have 6 pictureboxes and select one using Math.Rand()?
Jumping to one frame of a GIF is just excessively complicated. Have six static images.

Language of choice

Just curious..What is everyone's programming language of choice when developing apps for WinMo?
Ive been working (lightly) on a VB program, which is ok, but i feel it isnt as efficient as others might be, and i know efficiency and size is a big issue on mobile devices (obviously)
Depends:
A simple program or one that can be done just using the stuff in the standard system DLLs then I will go for the pain of coding it in WIN32 C++. The resulting application runs like the wind, and can be distributed as a single executable file, no CAB, no installation projects, etc etc.
If I need any web or fancy data functionality, then it is .NET, because it is not worth the hassle of getting all this to work from levels lower down.
Having had lots of previous coding experience in C/C++ then C# is the natural choice, but as far as .NET is concerned, the actual language you code in is irrelevant. It compiles down to IL anyway and the CPU 'JIT' compiles this into its own code before it runs. Hence the performance hit when the program starts and runs.
In .NET, in essence, all you are doing anyway, is creating .NET objects, setting their properties and calling their methods, in order to get them to do what your application requires. A simplistic view, I know, but that's is all there is to it!
The language that you use to do this doesn't really matter, it is just personal preference.
I guess i assumed one language had more efficantcy than another. Like im working with VB atm, and i know it simplifies alot of things to make it easier to use, not sure if it includes all that extra code in the final build or not tho.
I would like to get more pratice with C++ and i have yet to use C# so dono whats different about that.
I would like to eventually start making programs that utilize the .net code and get my programs talking though data on the phone, but im not that advanced yet.
currently im still trying to wrap my head about making a program with a local database. The program im working on currently doesn't store any data, but i would like to to. I would also like (if i get ambitious) to have that program possibly talk to a PC (parent) program and sync with it. But that i think is a ways off.
Also, do the Mobile SDK's look different? The program im working on i started in the 5 SDK, but (obviously) doesnt have Finger friendly IU tools. I haven't looked at the 6/6.5 SDK yet (as id have to start over again i think). Does it have more finger friendly options?
In .NET CF, the finger-friendlinnes and kinetic scrolling and this all isn't available for all controls. Most of them (the classic ones) are, but if you try using scrolling for whole form, it won't work, only scrollbar will. (Probably with some playing with physicsengine and marshalling you might be able to get it working here, too).
In C++, there are numerous examples of this gestures etc directly in SDK, also many other stuff is there.
See, the main difference here is that .NET is fully equipped with stuff to get everything done fast, easy way.
In C++, you must first make this way yourself .
i am using the .net 3.5 framework tho.. Unless you mean C++ vs C#. I thought .net was an expansion on a current language, and not a language on it self (meaning i cant choose to program in .net, its an option to VB, C++ or C#)
I did toy with it, and it appears as tho your right, the forums are the same. IE drop down/combo boxes are not finger friendly. Guess id have to turn it to a button and another form with large radio button options.
C# vs C++ main difference is that C++ is compiled to native code right on first time, which makes it very fast. C# is compiled to MSIL, which is NOT native code yet. When you run c# app, the code is being Just-In-Time (JIT) compiled to native code, which makes it "longer" to load and "slower" to run (usually that makes about 20% of speeddown on classic PCs with very optimalized C++ same code - it probably already is lower, this is a bit older result of testing).
C# has those nice features that it can't get out of its memory etc, the JIT is almost unhackable, so you can't write viruses in it etc.
As far as the SDKs are concerned, there are slight differences from one version to the next but they can be quite difficult to spot.
They can become issues, when code written to run on one platform is run on one several generations away. I have a program that was written in C++ WM2003. Works under all versions of WM until 6.5.3, when the About Dialog box fails to close if the (X) button is pressed. Turns out another value has to be added to the dialogbox flags field to get it to behave properly.
This has been a feature of SDK's from WM 5.0 onwards, but the WM2003 SDK is unaware of it. You have to add it manually to the shell code created by the SDK,
Progress I suppose. The full article is here:
http://forum.xda-developers.com/showthread.php?t=635063
Treo 700xw Verizon Spanish language
Hello fellow .... I'm new to this forum
I have a Treo 700wx and I live in Mexico ...
My Treo is Verizon's company and is currently with the version 1.22 ...
My problem is that it is in English and I need to change the language in Spanish ...
Thank you for your support both the need
Greetings
stephj said:
As far as the SDKs are concerned, there are slight differences from one version to the next but they can be quite difficult to spot.
They can become issues, when code written to run on one platform is run on one several generations away. I have a program that was written in C++ WM2003. Works under all versions of WM until 6.5.3, when the About Dialog box fails to close if the (X) button is pressed. Turns out another value has to be added to the dialogbox flags field to get it to behave properly.
This has been a feature of SDK's from WM 5.0 onwards, but the WM2003 SDK is unaware of it. You have to add it manually to the shell code created by the SDK,
Progress I suppose. The full article is here:
http://forum.xda-developers.com/showthread.php?t=635063
Click to expand...
Click to collapse
I noticed something else odd. When i run the app on my pone, the resolution is off. Now everything looks ok, i just mean that when i run it on my phone, theirs alot of "white dead space" at the bottom. I can only guess this is due to the SDK's catered to phones with smaller screen resolutions (ie Touch Pro) with buttons.. Is their a way for me to switch the resolution to ultilize the full Touch Pro 2 screen size (480x320 i think)?
Funny you should mention that. I replied to a similar post a short while ago. I'm not going to type it all in again, it's here.
http://forum.xda-developers.com/showthread.php?t=637417

[Emulator Skin] HTC HD2 Emulator Skin for Device Emulator / Visual Studio Designer

Hey,
this is my first contribution here on xda-developers and I hope you like it.
Overview
I've created a new skin for Microsoft Device Emulator and the designer view of Microsoft Visual Studio 2008 (2005). It is based on the HTC HD2 device and it looks so much more appealing than the outdated Pocket PC skin that the emulator / vs uses by default.
In addition to the improved looks, the skin offers more advantages:
The WVGA Emulator window now vertically fits on your desktop when using FullHD (1920x1080) resolution (or higher).
You have most of the buttons that modern devices use available: Send, Home, Start Menu, Back, End.
Modernized Windows Mobile application development/debugging experience.
(I know of the imminent release of the first Windows Phone devices, but I'm sure development for WM will continue for quite a while, especially on xda-developers. )
Screenshots (Click for full size)
HTC HD2 skin (left)
Default old Pocket PC skin (right)
Visual Studio Designer
Installation
The archive should be extracted to Program Files\Windows Mobile 6.5.3 DTK\PocketPC\Deviceemulation [Program Files (x86) on 64 bit operating systems]
Changing the emulator skin ist easy: Just click File->Configure...->Display and point the Skin textbox to the newly installed skin xml file.
For changing the Visual Studio Designer please refer to the instructions posted here: Form Factor 800 x 480
Notes
You can rotate the device by clicking the first of the two icons on the upper right hand corner. The other icon lets you reset the emulator.
Skin was tested with Windows Mobile 6.5.3 Developer Tool Kit and Visual Studio 2008 Professional Edition.
Known Issues
The hardware "Home" Button on the device does not always function as expected. According to this posting the hardware "Home" button is mapped to the Windows key (Smartphone Device Emulator table). However, when using the Pocket PC Device Emulator, the Windows key opens up the start menu, that's just how my emulator behaves. I couldn't figure out the key code for the hardware Home key - so if anyone knows the code, please send me a message.
I would like to thank:
splinter98 for his HTC HD2 MyMobiler skin (that's where I got the HD2 image from)
Version History
v1.0 - Initial Release
Download
Pocket_PC_Phone_WVGA_HTC_HD2-v1.0.zip
Have fun with it and let me know what you think.
Hey Freedee,
well done!! It looks realy good.
Greetings
It looks very cool, but just a quick question. Where did you get the Eiffel Tower wall?
its very good tnx man
phatestcat said:
It looks very cool, but just a quick question. Where did you get the Eiffel Tower wall?
Click to expand...
Click to collapse
The theme is called "Rock and Republic black" and is already installed when using the latest Emulator image (Build 23090).
You can check if your device has it installed by going to Start Menu -> Settings -> Home -> Appearance
You're Welcome!
FreeDee said:
I would like to thank:
splinter98 for his HTC HD2 MyMobiler skin (that's where I got the HD2 image from)
Click to expand...
Click to collapse
I thought that image looked like mine... (you can tell by the corners!) Glad you found the image useful - would try yours out if I developed apps using Visual Studio Designer but if I ever start I will be sure to check it out!
Looks good. should be better than what i had to do which was manually adjust the old look which sucked.
Simply Exxellent ! Thanks !
Thank's a lot for you work.
It's wonderful ...
how to change the resolution of this skin cause on my laptop with screen size 1440x900 this skin is quite... big ' but standard Windows Mobile 6 Professional skin looks normal... Or there is maybe something messed in my VS config. If yes, then how to fix this ?
Because its WVGA the height of it is 800 therefore including the window around the skin would probably be more than 900 (your screen height) and not fit on the screen properly..
Thanks! I was looking for this.

Categories

Resources