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 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.
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.
Does anyone know how I might be able to change the default lower toolbar buttons in the SMS\MMS screen? At present the options are "Delete" & "Menu" and I want the 'delete' to be replaced with 'New SMS', it seems daft to have a 3 stage process just to send a quick SMS. A new message menu would be an acceptable compromise but I'd prefer a direct link to an SMS since I use those the most by far.
Are there any registry mods that I can implement to do this?
I'm using the official 6.1 WWE rom by the way.
I use a program called WM5 New Menu and used M2DC to make my left soft key launch it from the today screen. Basically it allows me in one press to create new SMS, Appointment, Contact etc. Its quite configurable.
i know what he wants, and that's not it. isn't there some way to change it within the program?
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.