mini-s screen orientation change - Windows Mobile Development and Hacking General

Hi,
I've recently been handed a project that requires forms based data capture (on a xda mini-s). I dont want to limit users to having to use either landscape or portrait mode when completing the forms.
Is there a way to detect the screen orientation and/or get an event when it changes?
thanks
Andy

what language ?
win32?
.net?

yes good point
.net CF v2
C#

Sorted now - it actually generates a form.resize event
i was just over complicating the task

Related

Switch Radio on&off from .NET

Hi, I'm a .NET developer and I want to start to develop mobile apps.
My last device is a KJAM that need pen-tap to toggle radio on & off and this is a little frustrating for me (especially when it rains). So I decided to develop a simple (!) app so I can switch my phone on and off simply pressing the "red" button (for example).
Now I found how to bind the red-button-press event to my app but I really not yet found the (damn) method that let me to switch the phone (radio) on and off.
Can someone give me PInvoke samples to use in my C# app?
thnks
At least I can point you to an application, that does what you want.
read the thread http://forum.xda-developers.com/viewtopic.php?t=34831&highlight=
See my posts there (Conchas), and the .exe turned available by Koksie.
The same .exe toggles between enable/disable.
It is really great
thanks a lot ...
even if I wish to develop this app by myself (to start to "surf" the PInvoke hell) of course your advice will help me to reduce my frunstration switchin on my phone
You can always PM Koksie, asking for the function call he used.
I'll do it but he downloaded the program ... in the meantime ... the hardware button "4" now switch my radio on and off

today screen Plugin ?

hi
any one know how to code my own Today Screen Plugin?
i m a programmer.
i want to create my own usefull Today Screen Plugin like Clock.
short cuts. and timer..
i can only develop application for O2, but i dont know how to make
Today Screen
Hi tinkyawoo!
I assume you program in c++?
Today plug-in is basically a DLL that exports two functions with fixed ordinals.
InitCustomItem - the important one, and another (don't remember the name) for options dialog (if you want one).
There is an article on this at www.pocketpcdn.com.
You can also use my code published here for reference:
http://forum.xda-developers.com/viewtopic.php?t=45084
Good luck!
thanks. i will check it
tinkyawoo: if you're a programmer, I suggest checking out the SDK; it has a good example framework for a plugin, although watch out for the repainting bug in the sample.
Otherwise, read levenum's source code as well. It's excellent. You can learn a lot.
V
Would it not be possible....
Would it not be possible to write a small dll which can be controlled from VB.NET or C#.net to display certain things?
If this was released (under BSD or another permissive licence) then we could all use it to develop stuff, which would help those of us who's first language is Basic
Today Plugin
Unfortunately you can't write today screen DLLs in .Net.
There is a lot of info on the microsoft web site - if u care to search.
They do - however - give you a means of writing a EVC DLL that calls a .net application for the today screen info , but I haven't tried it.
Charlie Grillo
Re: Would it not be possible....
What do you mean by "controlled from". Do you want a .NET app to be able to effect the plug in somehow? If so, it is possible...since .NET is managed code and the plug-in is a native dll, the simplest way to have the two communicate is via windows messages.
You can do the following:
-Register a custom Message that your .NET app will broadcast to your plug-in(s)
-in your DLL WndProc procedure, listen for that message and act accordingly
Alternatively, you can have the dll do the same thing, but ofcourse, your .net app would have to be running to recieve that message (unless you have the dll launch it directly).
JonTheNiceGuy said:
Would it not be possible to write a small dll which can be controlled from VB.NET or C#.net to display certain things?
If this was released (under BSD or another permissive licence) then we could all use it to develop stuff, which would help those of us who's first language is Basic
Click to expand...
Click to collapse

How to run application in suspend mode ?

Hello eveyone,
I do not know if this is the right place to post my question, if not please advice of where I should do so.
My question is the following:
Is it possible to configure WM5 registry keys so as to enable an application run in suspended mode. In other words when the PPC goes to stand-by-mode I would like my application to keep on running.
I have developed a Java application (runs with IBM J9) but when the PPC enters the suspend mode, threads pause and the application does not behave as it should do. My intention is not to completely disable suspend mode for the PPC, but just for an application (as it is possible to prevent e.g. the 'sound device' ('wav1:') from going to suspend mode, when the PPC goes to stand-by).
Thank you in advaced.
No
Read here:
http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702833.aspx
and here:
http://blogs.msdn.com/windowsmobile/archive/2005/08/01/446240.aspx
Apparently, if you want your app to run, the device can't be suspended.
I'm not sure how useful this is, depending on your program, you might want to consider using notification queues to wake the PC up to run your software.
Anyway, I'm not sure how true what Setok said above, I do find many other programs that runs with my PPC is in 'suspend' mode. E.g. I've tried various timer (count down) program which seems to be able to run in background when after I press the power-button to suspend it. I wake my phone when it reaches 0. And it is done without using notification queue.
The links above certainly seem to authoritatively state that applications can't run in sleep mode, so I posted it. But hanmin's post made me wonder what was up, so I went looking. There are a few more states.
An application can use:
PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE);
to put the device in unattended mode so that it doesn't suspend. In unattended mode the backlight, LCD, and audio still turn off.
There are a couple more power states explained here:
http://blogs.msdn.com/windowsmobile/archive/2005/08/10/450186.aspx
If you do put the device in unattendedmode be sure to call
PowerPolicyNotify(PPN_UNATTENDEDMODE, FALSE)
before you exit.
I just re-read your post, you want audio on, then use ScreenOff mode. See the above link.
Good luck
Registry way....
Hello guys,
thank you very much for your concerns and details.
To tell you the truth I have read all of these in the past. And I believe that since you can program this on-the-fly probably you can do it also by altering registry keys. In other words, not do it programmatically, cause this involves writting a C program (mu application is Java). After all if you notice ....the values that you can change through you C application to alter suspend mode for you application are 'registry values'.
My application is an event calendar, that checks the time and if there is an event it notices the user. When the mobile goes to suspend mode the thread pauses and the application does not work as appropriate...Tha't why I would like to set it in the registry-stage...
If you find anything of interest I would be more that thankfull
Thank you in advanced. ;-)
Christos
Hey,
have a look at the CeSetUserNotificationEx() function and the CE_NOTIFICATION_TRIGGER structure.
This is the way MS calendar app does it on the device.
Register your exe for a special time and if in suspend mode and
the time is reached you app will bestarted. Nice or?
Infos here: http://msdn2.microsoft.com/en-us/library/ms913969.aspx
Houser
Hi all,
I recently installed Pedometer on my HTC HD (with MaryOne X0.04☻Build 23502 COM5☻Leo 1.43), but I would like to "suspend" the device, and yet let the Pedometer run in the background, so it could measure my walk distance/steps.
I am not a programmer, but I could change a few registry settings if anyone could point me in right direction...
Thanks in advance,
cheers,
Nenad
p.s. - it should be possible, how all the other "background" programs are running (the clock, the notification, the G alarm...) ?

[VB.Net] DirectDraw or Similar

Hey Guys!
Iam searching for a possiblity to draw on the screen with DirectDraw, Sprites or similar, fast drawing operations(with transperant and so on). Someone knows how it works?
I also want to block the camera and other Hardware keys to use them exclusivly for my programm
thx!!
SciLor
Direct Draw
I Really Want It Too But Microsoft Didn't Build Any Directdraw Library For Vb.net & It Only Supports C++
Is there another API you can use?

CycloneSkins [Knowledgable Coder Wanted]

Hello,
I have 'created' (to an extent) the first Horizontal Theme , based off of the built-in CPR file, for Titanium Homescreens on WM6.5, however I have a setback...
This theme is being developed initially, and probably mainly, for the T-Mobile DASH (HTC Excalibur/S620) which as a 320x240 screen. In order to make this work, i need a very simple background program running. This is what the program should do:
Detect a certain set of pixels on-screen, and check to see if colors match up with predefined values (much like MortScript's "ColorAt()")
If the values match up, swap UP/LEFT and DOWN/RIGHT (to emulate horizontal movement)
likewise, if it detects that the active window is the Desktop/Homescreen, it will Swap
If not, it will not do anything
This program needs to be low RAM usage, and not all that big (which is optimal for every program). The reason I have it check pixels is for people, like myself, who run SmartToolKit , which adds a 'mask layer' over the HomeScreen, making it harder to detect if it is actually the homescreen. If someone can create a better way of doing this, then thank you!
However, my main concern is getting a coder to make this application for me, without it the theme can essentially not exist. More details will be given upon contact.
If you are interested, please PM me or E-Mail me (both are provided by XDA through my profile).
Thank You all!
I am going to work on the actual theme today...
Is there anyone who could make this very simple program for me?
Hey,
I dont know if this is considered 'double posting' since these posts are weeks apart...anyways.
I am in DESPERATE need of some kind person to lend me a hand as far as making really a simple app. I do not have the environment set up for making Windows Mobile applications (i do not have Visual Studio as microsoft insists I do). The app would be:
1- ButtonSwap:
This one will check certain pixels on the screen and use them to confirm if it is the HomeScreen. If it is, then it will swap keys, if not, it wont do anything.​
So PLEASE, if someone is willing to do this VERY SIMPLE task, i would be very very grateful!
Sincerely,
Max B.
Cyclonezephyrxz7

Categories

Resources