Hi again,
the application which I'm programming shall run in kiosk mode. Currently, I have a quite simple realization by hiding the shell parts (Taskbar, Start-Icon and SIP button), and by resizing the main window to screen size.
That works quite fine, I've additionally deactivated all of the hardware buttons.
But: The application shall access the device's phone application. Every time the phone application is active, there appears the Start-Icon and other items of the standard WCE screen.
How could I avoid this problem?
I'm working on the ARTEMIS device, Windows Mobile 5.0 and I'm programming in native c++ (Visual Studio 2005)
thanks,
Günther
Quick question:
I assume you use SHFullScreen API to hide the taskbar and stuff.
At what point do you call it?
According to documentation and from my experience you need to call it after your window becomes foreground so doing it from WM_CREATE may be too soon. Try returning the HWND from Create window and using it to call the SHFullScreen isntead of WM_CREATE handler.
You can also, move/resize/hide navigation bar window and check it in loop.
Use a Remote Spy++ to determine windows classes.
@levenum: Yes, I'm using the SHFullScreen API. Currently, I'm calling it after pressing a button to toggle full screen mode. However, this doesn't prevent the application to show the taskbar after the internal Phone application has been used. Furthermore, after using the phone, my application automatically swiches back to reduced screen mode in any case.
@THEVK: Well, this also sounds reasonable - I could already acquire the handle of the taskbar and hide/disable the window. Now I still have to think about bringing the phone application or the contacts application to the background when they aren't needed anymore. But I think I could do that by simply adding some buttons to my main application and placing them at the location of the taskbar...
thanks and cheers,
Günther
Taskbar have a code, which bring it on top always, IMO.
I think, the best solution to hide taskbar window and place your custom window there.
disable kiosk
hi a customer brings a windows mobile phone which is in a kiosk mode and he don't know the password for it and i can not take it back again is there any way that i can disable kiosk mode??
It sounds more like the phone is locked by a password than that it is a actually in "kiosk mode".
In such case there is a high possibility the reason the customer does not have the password is because it is not his phone.
But if that is not the case (and I hope so) then you should give details about what kind of phone it is (exact make and model) and describe the kiosk application that is running.
Perhaps then someone will have the answer for you.
Related
For those worried about the phone app using too much memory in the background:
WM2003 and WM5 compatible.
This program is used to toggle the phone.
Useful if assigned to a hardware key or a shortcut.
If the phone is open, it will be closed. If it is closed, it will be opened.
Please note, for VGA WM5 users use my VJBigPhone app instead.
This application supports international language versions. By default it will look for the "Phone" window.
If your phone is called something different, launch the application with command line parameters matching the name of the Phone.
eg In German
\program files\vijay555\vjphonetoggle\vjphonetoggle.exe Telefon
After installation you will find a shortcuts in StartMenu > Programs > Vijay555 > VJPhoneToggle.
Check it out on my website!
EDIT: guys I think I made the cab wrong. try the exe for tonight
www.vijay555.com/vj/releases/vjphonetoggle/vjphonetoggle.exe
V
Any1 got a screenshot how this looks like on a Qtek 9100
q-biq, it literally just closes the phone app. Or launches it. Nothing to see!
V
I didn't really understood the goal for this tool.
Phone dialer opens easly pressing the TALK button, and closes also easly by tapping on "X" or pressing END button.
For sure this tool is supposed to do something I didn't catch.
However VJ, I'd like to propose you a challenge, for another "similar" toggling tool.
The porpose is: I have a SIM Twincard to use with the mobile phone fixed in my car.
Whenever I power on the car, it is supposed to switch off the mobile phone to avoid SIMs interference. This is simple for a regular phone, but not so practical for a Windows PDA Phone.
You have to:
- switch device on
- tap on 'Radio signal icon'
- tap on 'Turn on flight mode'
And when leaving the car, repeat all again to activate phone.
My idea was a small program to assing to an hard button, which would toggle the 'filght mode' or just GSM radio.
So you have to press just on buuton like switchi.ng the on/off
What do you think?
Conchas: this application was made for mzaslam, under this thread:
http://forum.xda-developers.com/viewtopic.php?t=34718&start=0&postdays=0&postorder=asc&highlight=
He is concerned that the phone app uses quite a lot of memory in the background, even when not in use. Pressing ok just puts it in the background. So VJPhoneToggle fully unloads the phone app when you're finished with it, and loads it again when required.
Re the Flight mode thing: I will have to make this app, but I use a dual sim myself and also use the flightmode off > flightmode on trick to switch sims.
I use PhoneAlarm on my setup. This can be set up to launch from a shortcut to switch profiles, so for my setup I use a today screen shortcut on claunch to switch to flight mode, work, home etc. So for my setup I have three thumb friendly icons to activate profiles on PA. So I can switch easily from Today. Is that ok?
V
Yes it works.
... but I always hae been looking for a small toggling application, assignable to an hard button.
Conchas: I don't understand. What do you want your hardware button to do? Load/unload an app?
V
I want my hW button to toggle 'fligth mode' on/off.
Or more exactly the phone radio on/off as the wireless manager does. More precise, as nowadays allmost every PDA phone device supports BT and WiFi.
i.e. I would like to enable/disable the SIM ability to register into the GSM/3G network, in order to avoid interference with a second SIM (twin card), whenver required (e.g. using into a car).
It is not just a matter of the last phone switched on, because when travelling by car, as you move to other network cells, the first phone switched on most likely will take the handover.
Guys, this has been updated to not require an international parameter on the command line.
It should internally support all international versions. I hope!
V
Conchas, is this what you are looking for? Just copy the exe to your device and bind it to a hardware button.
Great, Koksie
It works!
I'm using it manually.
Can you tell, where to put the '.exe', so it gets visible to assign on the "Settings > Buttons"?
I 've added it to '\Windows', but didn't get it visible.
Thanks
Fernando
You don't have to put it in windows. Just make shortcuts to it in the start menu. Any startmenu shortcuts get picked up by the Buttons cpl.
V
Hi,
Forget it.
I miss something. In fact it was possible to assign to the buttons, if copied the '.exe' to '\Windows.'
Great!
Thanks Koksie
Fernando
Hello,
I have such a problem. But first I will explain why I have that problem.
In company we are using a PocketPC with Windows Mobile 2002. And have only one apllication for work.
When connecting to Server we need to tap the left bottom corner of the screen.
Many of workers tap with diferent objects like cutters, pens, not with Stylus, so the left bottom corner become bad in 1-2 months, till the time I can't do nothing, just changing the screen.
So. There is a posibility to implement somehow a ShortCut to that menu, to avoid taping that part of screen? (Because after that in program we use only buttons.)
(Note: I have no source code for tha app.)
Any kind of help will be apreciate.
Thank you much!
It's easy to simulate screen tap by code.
Do you have experience programming in C/C++?
If so all you have to do is write a little app that does the following:
Code:
HWND hWnd; //window handle
hWnd = FindWindow(L"BUTTON", L"Connect to server"); //this text is just an example
SendMessage(hWnd, WM_LBUTTONDOWN, 0, MAKELPARAM(5, 5)); //actually simulates the click
Then you can assign this app to a hardware button using device settings or put a shortcut to is in the start menu.
I don't know of any ready apps to just simulate a click, but there was a thread around here somewhere on a virtual mouse app for PPC. It's free so try searching for that. (Sorry, don't remember the link).
Good luck.
Thank you man.
I'll try this...
levenum said:
It's easy to simulate screen tap by code.
Do you have experience programming in C/C++?
If so all you have to do is write a little app that does the following:
Code:
HWND hWnd; //window handle
hWnd = FindWindow(L"BUTTON", L"Connect to server"); //this text is just an example
SendMessage(hWnd, WM_LBUTTONDOWN, 0, MAKELPARAM(5, 5)); //actually simulates the click
Then you can assign this app to a hardware button using device settings or put a shortcut to is in the start menu.
I don't know of any ready apps to just simulate a click, but there was a thread around here somewhere on a virtual mouse app for PPC. It's free so try searching for that. (Sorry, don't remember the link).
Good luck.
Click to expand...
Click to collapse
So I have not so many experience in C++ and nor in Visual Studio.
Can you provide me with full c++ code for Visual Studio 2005?
Thank you in advance.
Here is another way. Just create a simple project in vis studio ( I am not using 2005 so I cant tell you what its called, if all else failes use the "hello world" option). Open the main .cpp file and after the includes delete everything. Paste this in....
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_ABSOLUTE,61439,1638,0,NULL);
return 0;
}
Then build the exe. Make a shortcut to the exe on your device and place it in the windows\start menu folder. When the user taps the shortcut the cordinates specified will get a mouse down message, not all ppc programs will rspond to this message but most bought software I have do.
As it is, this will hit the close button on a 240*320 display. To vary the target location see this from the documentation:
If MOUSEEVENTF_ABSOLUTE value is specified, dx and dy contain normalized absolute coordinates between 0 and 65,535. The event procedure maps these coordinates onto the display surface. Coordinate (0,0) maps onto the upper-left corner of the display surface, (65535,65535) maps onto the lower-right corner.
...So you may need to play with it to hit the spot.
If that fails then just replace the
mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_ABSOLUTE,61439,1638,0,NULL);
with levenum's code putting the name of the window you are talking about in instead of "Connect to server" to send the normal WM_LBUTTONDOWN message to that window.
OdeeanRDeathshead, your method seems to work. I did it and application works proprely on my Magician.
But now the question is: I need that program for a PocketPC 2002 platform. How to do this in VS2005, can explain me anyone?
Thank you in advance.
Actually, you can't write apps for WM2002 using VS2005.
You need eMbedded Visual C++ 3. It is available free from Microsoft, just search the site. You will also need to install Pocket PC 2002 SDK. (also free on MS site)
levenum said:
Actually, you can't write apps for WM2002 using VS2005.
You need eMbedded Visual C++ 3. It is available free from Microsoft, just search the site. You will also need to install Pocket PC 2002 SDK. (also free on MS site)
Click to expand...
Click to collapse
Ok.. all this I installed.
I will try to do the program there. But problem become more complicated.
My PDA's are not HTC. They are modified by SYMBOL company. So.. I realized that i have no HARD BUTTON.
In start menu I can't let the application, only because START is not accessible. The only program is that for work and it's full screen.
The PDA have a keyboard.
The question is: it is possible to do in program a HOT_KEY combination, and run MOUSEEVENTF_LEFTDOWN only when HOT_KEY combination was pressed.
I understand that program must remain in memory to intercept that.
Do you mean that there are no buttons on your device, only a keyboard?
Doesn't matter really because as far as windows is concerned keystrokes from device buttons and full keyboard are handled the same.
Sorry I am not really familiar with setting up hot keys, I think your app window needs to have input focus for that to work.
There is a function called SetWindowsHookEx that lets you hook all keyboard events so they will pass through your function. You can then have a small app in background (without UI) that will monitor any key combination you want and simulate the tap when necessary.
levenum said:
Do you mean that there are no buttons on your device, only a keyboard?
Click to expand...
Click to collapse
Yeah.... it looks like this http://www.symbol.com/PDT8100
I do not know if you can throw some cash at your problem but SKScHeMa from www.s-k-tools.com can wait for an application to start then execute a script. In the script you can simulate both tap and tap and hold actions.
Hope that helps.
Regards cjb.
One of those buttons must correspond to the buttons on the normal ppc. It would be overkill too write an app to run constantly just to redirect one tap. Do you have the opportunity to ever start the unit without the fullscreen program running, if so you could experiment with the button assignments to find the correct one. If the author of the custom software on the thing was half good they could have disabled those buttons assignments while its running, but if they didn't thats the best solution.
If that fails perhaps a program to run after powerup and ask if the user wants to connect to the server could work. It could show for 10 seconds then end. There was a thread here somewhere about programs starting on powerup but I can't seem to find it now.
edit:
I read the specs and it has two "side scan keys", I bet they are your buttons waiting to be reassigned!
OdeeanRDeathshead said:
One of those buttons must correspond to the buttons on the normal ppc. It would be overkill too write an app to run constantly just to redirect one tap. Do you have the opportunity to ever start the unit without the fullscreen program running, if so you could experiment with the button assignments to find the correct one.
Click to expand...
Click to collapse
No one of that buttons corespond to CALENDAR or CONTACTS or CAMERA or RECORD button.
I can start the device without work program. Also I don't need to simulate tap, because I own my PDA and have knoweledge how to use it.
Users don't know much... for that i disables all. Only Work program in fullscreen mode without START MENU.
I read the specs and it has two "side scan keys", I bet they are your buttons waiting to be reassigned!
Click to expand...
Click to collapse
This is a PDA with barcode scanner. That 2 buttons named "side scan keys" are only for SCANNER and are not programable.
TO ALL: Thank you for your support![/quote]
cjb said:
I do not know if you can throw some cash at your problem but SKScHeMa from www.s-k-tools.com can wait for an application to start then execute a script. In the script you can simulate both tap and tap and hold actions.
Hope that helps.
Regards cjb.
Click to expand...
Click to collapse
Thanks for help.
I can't do any investitions in that.
More of that it's not the same I need. I need to simulate this not only at start, also during work.
Yes, so make the prgram asking if a connect is needed run when the power button is pressed. If the user needs to connect they press off then on then the window comes up asking if a simulated tap is needed (I do not mean reset). If the full off is not desireable then dose your unit change the brightness when the power button is held down? If so, and if it is using the standard name for the named event to signal brigtness changes then you could make the tap simulate program run all the time in a loop but waiting for the brigtness change event. Waiting will take up almost no processor time and the program is so small it takes up almost no memory! The user just has to hold the power button for several seconds and the your window will pop up. The down side is that your app will also have to save then restore the brigtness settings so the user dose not need to manualy reset the brigtness level.
Hi,
my application on Windows Mobile 5.0 shall run in kiosk mode. Therefore, I've disabled the TaskBar and did some other stuff. Basically, it works great, but I'm still having a few problems:
1. When I hide the taskbar, also the "OK" Button which is needed by some dialogs gets hidden. Therefore, when the user e.g. wants to change communication/GPRS settings, there is no way to accept the changes or close the regarding dialogs. (I have to use these sort of things provided by the operating system - thus, the OS is not entirely hidden).
Is there any possibility to simulate the TaskBar's OK button within my own application? (E.g., by sending a certain Windows-Message indicating the OK-Button pressed?)
Or, alternatively, is it possible to just hide some parts of the TaskBar (e.g., the Start Button) and keep the OK button, clock, and GSM status visible??
2. Somestimes, there appears a system-notification window, e.g. notifying the user about establishing a GPRS connection, or regarding failures. Is it possible to intercept these dialogs and to hide them, or just to disable them such that the user can see it, but tapping the "Cancel" or "Settings" button won't cause any action?
I'm working with Visual Studio 2005/windows Mobile 5.0 SDK in visual c++ and I'm using the HTC ARTEMIS device
Kind regards,
Günther
1. You can send WM_COMMAND with wParam = IDOK.
It must work, because it's how app handle it!
Is there anything I have to consider when sending WM_COMMAND system-wide? A simple PostMessage(NULL, WM_COMMAND,...) seems not to work. Do you see any possibility to get a Windows handle to the active application that should receive the WM_COMMAND message?
Or do you have any idea how applications tell the TaskBar to show the OK or Cancel button? I think this happens via system-wide windows messages, doesn't it? But which messages, and how to intercept them???
Any help is still highly apprechiated (it seems that nobody else did ever have this problem, also in various fora I couldn't yet get an answer... )
I have the same problem with the ok buttom. My PDA have 1 buttom for the camera, so I use this buttom like an OK buttom, for now.
But I´m still trying to make the ok buttom be operacional on the blocked taskbar.
Dear XDA-Developers,
As a volunteer for a project i'm making a webapplication which is controlled by a pocket pc.
To make it useable for people i want Internet Explorer to start automatically on the boot of the device. That on itself isn't that hard, i know.
I need IE to open a specific webpage, and go in full screen mode.
Maybe it's not that difficult, but next to webdeveloping, i can't make software etc. so i was hoping someone has a solution for me. It would be a big help.
Thanks in advance.
You can use Resco Explorer to make a shortcut like this:
"\Windows\iexplore.exe" http://www.xda-developers.com (To open your favorite site )
You can put this link in \Windows\StartUp\
I currently don't know a method to open fullscreen.
Well last time I tried if I exit IE when it's full screen, it stays full screen next time I opened it. This is with WM6.
Hi,
Not sure if this will help but Confused Stu has just released a ROM that starts IE in Full Screen.
http://forum.xda-developers.com/showthread.php?t=371014
Cheers.
THIS is how to start Pocket IE in FullScreen mode
I'm sure this is waaay too late for your project, but for the sake of posterity (and for the search engine) here is how to start Pocket IE in FullScreen mode...
It's in the registry- HKCU\Software\Microsoft\Internet Explorer\Main
the key is a DWord called "FullScreen" set it to 1.
Obviously, if PIE is already running (minimized but not closed) you'd have to kill the process, write the registry entry, then open PIE. PIE retains the fullscreen setting until you change it (either via the registry or by exiting fullscreen mode within PIE) but it couldn't hurt to check the registry value before firing up PIE.
All of this easily done via Mortscript. In the case of a console-type app that runs on startup and you want the user to stay in that app (and out of the rest of the system), you'd want to check periodically to make sure PIE was the active window, and activate it if not. You might also want to prevent access to the PIE menus (via the SoftKeys) and also the Start Menu button. I'm sure there's a util somewhere to disable the HW buttons, but off the top of my head, I can't think of any.
Hi,
I'm working on programm with .NET Framework 3.5 for my HTC Touch Diamond 2.
Now I need help on two issues:
1. Fullscreen (hide taskbar)
I set WindowState to Maximized and FormBorderStyle to None.
This works on the emulator. On the emulator, the form is maximized and the taskbar is not visible anymore.
However, when I run the same programm on my htc diamaond 2 the taskbar is still visible! Does anyone know what the problem is?
2. Form.Closing
In the form closing event I want to show a message box "Are you sure". If the user clicks 'no', I want the application to not close.
For this purpose I cancel the CancelEvent: e.Cancel = true;
But this doesn't work: The from gets closed anyway but the application process keeps running in background. The programm doesn't appear in taskmanager running applications but only in running processes. So I cannot switch back to my application.
Any hints how I can manage this?
Thanks
Tom
noone got any experience with this issues??
TomRR said:
Hi,
2. Form.Closing
In the form closing event I want to show a message box "Are you sure". If the user clicks 'no', I want the application to not close.
For this purpose I cancel the CancelEvent: e.Cancel = true;
But this doesn't work: The from gets closed anyway but the application process keeps running in background. The programm doesn't appear in taskmanager running applications but only in running processes. So I cannot switch back to my application.
Any hints how I can manage this?
Thanks
Tom
Click to expand...
Click to collapse
From my Windows programing experience (not WM though) your code should go like this:
Step1: Bring up a dialog box with your question
Step2: Main form is waiting for the result of the dialog box
Step3: Once the main form gets the result THEN it decides what to do: Exit or "nothing"
What I want to say is that you should not "cancel" the event. You should not generate it in first place if the user does not click on "Yes, I'm sure"
Thanks for your response.
As far as I know, I cannot prevent the closing event to be raised when the user clicks the 'x' in the taskbar.