yashsingh1/xdaforums huggingface dataset:
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
New StylusLock v1.2 with StylusLock indicator when locked

I added a new version 1.2 with StylusLock indicator.

See first page.

Hope this version 1.2 is also appreciated and has no bugs ;)

Unfortunately I was fiddling around with the notification icon API and it disappeared after some time. So now I am removing and adding the StylusLock notification icon, when locked, every 55 seconds. Still this consumes no extra battery and also the CPU is showing 0, and once per 55 seconds a small 0.5 (from 100 :)

I am new to Windows Mobile programming, so maybe it is possible to keep the notification icon from disappearing. Check the source code. Any more elegant solution? Or the missing setting for the API? Or is this default Windows Mobile behaviour?
[Touch Diamond, MDA Compact IV Themes and Apps] Pietje_1985:
no words....just excellent program ZuinigeRijder.........:D;) Thanxx

(mod: please make this thread Sticky....)

Greetzz Jeroen
[Touch Diamond, MDA Compact IV Themes and Apps] Ddriver:
Nice one, congratulation for this great app.

Greets Ddriver.
[Touch Diamond, MDA Compact IV Themes and Apps] darkelf_00101:
doesnt seem to work on touch pro

i know this ap was created for the diamond but most of the diamond software is compatable with touch pro ... however this is not
[Touch Diamond, MDA Compact IV Themes and Apps] vibecatalin:
Now is it compatibile with SensorLock?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I know version 1.1 works on Touch Pro (others reported that).

Does version 1.2 no longer work on Touch Pro?

What is the problem?

Does the StylusLock locked icon not appear when doing Stylus OUT and IN within 3 seconds? Does it not vibrate? Does it not install?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
You need to choose which one, because the locking methods can compete which each other.....
[Touch Diamond, MDA Compact IV Themes and Apps] mihaid:
bluetooth headset

First of all thank you very much for a great app. Just to let people know that if connected to a btooth headset when a call comes in, you can answer it via your headset answer control without having to unlock the diamond itself. Hope this helps someone.
[Touch Diamond, MDA Compact IV Themes and Apps] sandmen:
@ZuinigeRijder

in your sourcecode v 1.2 fails the notify.h + notify.cpp files.

;)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Oops, added version 1.2.1 with those 2 files added, where I also fixed the bug of disappearing icon.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Thanks for the info. I added this in the feature list.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I had a lockup today of my TD with version 1.2

I hope that version 1.2.1 is not buggy, I do no longer need to reapply the locked icon.
[Touch Diamond, MDA Compact IV Themes and Apps] darkelf_00101:
It installs ok but the ap seems to fail on TP after that (1.2) it does not initialise when you pull out the stylus and is not locked when the stylus is engaged.

I see this morning that you have version 1.21 now i might see if that is compatable..

ps thanks for all your good work.
[Touch Diamond, MDA Compact IV Themes and Apps] Blob8me:
Brilliant.

Have just installed 1.2.1 - Love the enhancements and think that the "Locked" notification on the top bar is perfect.

Thanks again for sharing your hard work! :cool:

PS. I have updated the Raphael thread..... :)

.
[Touch Diamond, MDA Compact IV Themes and Apps] N3m3515:
in version 1.2.1 i cant enable the stylus log after i disabled it in the programms folder. it still says that its enabled. do you want to disable it?

but it doesnt work. had to do a restart to get it work again.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
After installing StylusLock, the program will auto start with each boot/reset. However, initial the "Stylus Lock mode" is disabled. So indeed, when you insert the Stylus, it will NOT lock.

* You first have to enable the "Stylus Lock mode" by pulling OUT the stylus and inserting it WITHIN 3 seconds.

* This will toggle to "Stylus Lock mode".

Other ones confirmed version 1.2.1 is working on Touch Pro too.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I tried to reproduce. When I run the program in the Programs folder, it indeed asks to disable it (because it is already running). When I disable it, StylusLock is no longer running (checked with TaskManager).

When I start StylusLock again via the Programs folder, it just starts (as expected). So I cannot reproduce your scenario. Or is my scenario not correct?

Note that normally you do not start StylusLock via the Programs menu, because it auto starts with each boot/reset. Was there a specific reason you wanted to disable StylusLock? Because you can safely keep the program running in "StylusLock mode" disabled.
[Touch Diamond, MDA Compact IV Themes and Apps] N3m3515:
your scenario is correct.

this is how i did it. but in my case its different.

i dont want do disable it. just wanted to report this bug.

maybe its my fault because i first installed styluslock without .net 3.5 and reinstalled it after the .net installation.
[Touch Diamond, MDA Compact IV Themes and Apps] mr_dimpy:
:):D This is fantastic I love it. I have tried the other locking programs and this is by far the best. Thanks and cant wait to see what else you can do to improve the app. :D:)
[Touch Diamond, MDA Compact IV Themes and Apps] caniala:
hello,

i have a big problem with stylus lock, i don't work on my diamond...

i have installed the latest version, i have the icon in program to enable or disable, and that's all

htc touch diamond rom 1.93.406.1 FRE

ps : sorry for my bad english, i'am french
[Touch Diamond, MDA Compact IV Themes and Apps] N3m3515:
just soft reset and it should work.

.net 3.5 is required
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
No longer vibrate when the backlight is on and it goes to locked.

Because the intention of StylusLock is to use no real extra battery:

* Added that StylusLock will no longer vibrate when the backlight is on and it goes to locked. The visual icon is good enough in that case.

* But if you put the TD to sleep first by using the power button or the backlight is off and thereafter locking the TD, then it will still vibrate for non-visual feedback.

* Also did some measures for preventing rarely occuring lockups.

Hope this improvement is liked, otherwise keep version 1.2.1.
[Touch Diamond, MDA Compact IV Themes and Apps] vakata:
Perfect app but minor problem

Thank you for the great work. It is nice to see someone actually trying to keep things simple.

Just one minor problem though - in two days usage the phone froze twice - both times when i removed the stylus (the phone was locked). Well, actually it did not freeze - the LEDs where functional (when removing/inserting stylus) but the phone did not unlock.

Also the icon tends to disappear.

Still - very good work!

EDIT: I was using version 1.2.1!!! Downloading 1.2.2 now!
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Yes, I had this very rarely too, and I hope 1.2.2 is better in this respect. But I am not sure I have solved this problem definitely now. Unfortunately, I thought it was also more related to my TD, because this is the first time I hear from others having sometimes the same sort of problem.

Note that I never experienced this problem with 1.1, which did not use the locked inidcator. I looked several times to the differences and I could not find the real bug. It maybe even the case that it is a Windows Mobile bug. Hopefully it will occur even less with version 1.2.2 or better, not at all.

Maybe experienced Windows Mobile programmers can look into the source code provided, to see if they spot a bug :confused:.Especially, they should focus on the differences between version 1.1 source code and version 1.2.2 source code, with the added notify.cpp and notify.h. Sometimes someone else spots a stupid problem better than the writer of the stuff :p
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
CapacitiveFingerLock

To let people know what will be the next improvement of StylusLock, I am working on CapacitiveFingerLock in combination with StylusLock:

* to have it possible to lock and unlock "one handed". The StylusLock approach cannot be done "one handed", e.g. on a bike.

* Also some people do not like to operate with the StylusLock (always).

* The combination with this new CapacitiveFingerLock and existing StylusLock will suit more people.

* And sometimes people will use the Stylus, so they will get the right behaviour depended on the usage pattern

* Still the goal is to let it consume almost no CPU and battery and KISS to operate

I also responded on another thread about this:

http://xdaforums.com/showpost.php?p=2716972&postcount=17
[Touch Diamond, MDA Compact IV Themes and Apps] vakata:
1.2.2 - unable to unclock

I guess it is the same problem again (this time with 1.2.2) after 6 hours of standby, when I remove the stylus the buttons lit up. But the screen did not, the buttons did not respond. Only removing or inserting the stylus changed turned the LEDs on/off.

I will try version 1.1!

Still - great job - nothing out there that is even close :)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I was afraid it would not really solve the problem totally. So I hope others will help me to look at the source code too, to spot the bug :D. Of course I also will try to find the real bug :confused: Is there some pattern when it occurs (things done before)? I think myself it may also related if you have charged it via de USB cable with USB disk on.

Let me know if version 1.1 does work as expected, without the freeze problem. I know it is difficult to judge, because it normally occurs only after using a while. Unfortunately you have to miss the nice lock indicator. But at least it is functional.
[Touch Diamond, MDA Compact IV Themes and Apps] bennec83:
I love this app, but is there any way that the power button could be unlocked when styluslock is enabled?

It would be much easier for quickly checking the time etc, also it would save battery life as it would be possible to put the diamond to sleep when styluslock is enabled instead of waiting for the device to go to sleep on its own.

would this be possible?

many thanks for your work
[Touch Diamond, MDA Compact IV Themes and Apps] Curb71:
agreed. but either way I LOVE this app! Thanks so much!
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I think I understand what you mean. You want to put the phone on, for just checking something which does not need touchpanel or hardware keys, e.g. the time. But you cannot put it to sleep again with the power button thereafter. Unfortunately, the behaviour cannot be influenced by the program, it is something to do with the function StylusLock calls to lock everything. Now you must wait till Windows Mobile falls back to sleep.

If you do not want to wait till it goes back to sleep, you can do the following:

1. take out the stylus, so the phone wakes up (so you do not need to press the power button)

2. check e.g. the time or do other stuff

3. press the power button to go to sleep again

4. Put the stylus back in (be sure this is longer than 3 seconds after taking out the stylus).

I understand that this is an extra step, using the stylus, you do not always want. But for now this is the only possibility.

I am working on an alternative unlock/lock using the capacitive panel, with just soft touching with your fingers. So that would work with the above scenario.

One of the other possibilities would be to have some (registry) setting, e.g. 30 seconds, which can be configured independent of the Windows Mobile settings, to go to sleep in this case (just force to go to sleep back, when not unlocked within the specified time). I think this can be a valuable addition, with e.g. a default setting of 30 seconds. I will think about this.
[Touch Diamond, MDA Compact IV Themes and Apps] vakata:
So far so good - no probs with 1.1 (I did get a crash actually, but I had the same crash the first day when I bought the device - nothing but black and white waves all over the screen - it is not related to stylus lock).

Unfortunately I could not find a pattern with 1.2.2.

Still - thanks for the reply - LOVE the app :)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Because I do not want to suspend when it is not wanted (e.g. a GPS application is running) I made version 1.3 which behaves different than initially asked for, but still saves battery without side effects.

When the phone is locked and the backlight goes off, the phone will go in suspend mode :rolleyes: In this way, it will not wait till the Windows power setting "off when not used for x time" is elapsed, but it will suspend already when the Windows power setting "backlight off when not used for x time" is elapsed.

Note that you can also suspend immediately by first pressing the power button and then putting the Stylus in. However, then it will vibrate. I do not know which one will cost less battery. For example vibrate or 30 seconds for Backlight Off setting :confused: Anyway, you have both options to choose from :)
[Touch Diamond, MDA Compact IV Themes and Apps] Curb71:
hello.

I really love your app. I have a few questions/comments I would like to ask.

- I noticed when I recieve a text or call and am not arround to answer it or did not hear it the screen turns on and then is locked on which kills my battery fast. I thought it was supposed to turn off again but never did until I noticed I had a real hot almost dead phone in my pocket. lol

- the program decided to stop working apparently since I noticed the icon is gone and when I go to the settings (which it only has enable or disable?) and toggle on and off, nothing happens. Maybe I can uninstall it and reinstall it or try another version. (im currently using 1.2.2)

- I would love the program if it did not have the 3 second thing. If my phone locked when the stylus was in. and unlocked when the stylus was out, nothing more, that would be perfect imo.

- the other guy that mentioned when the phone is locked you can turn the screen on, but not turn it off. I wish it was different so you CANT turn the screen on or off. or you CAN turn it on or off when locked. Either one. but not a little of each.

I dont want to sound like im *****ing. These are just some things I think would make this little app perfect and if they are not a possibility I understand. Thanks for reading my novel lol. Im off to try another version of this program.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Apparently you encountered the bug that sometimes the lock icon is freezing the phone. I do not know the reason, maybe it is a Windows Mobile bug or my program bug. But maybe other developers can help finding the bug :confused:

Sometimes you do want to put the Stylus back (e.g. when using GPS), because you do not want to hold it in your hands or put it somewhere else. Therefore I did not choose for this option.

Unfortunately, I cannot control both options programmatically. It is just as the API I used works.

There is a new version 1.3, which goes to suspend mode earlier. However, I still think the freeze bug is not fully solved.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Reproducable scenario of freeze

Damned, I found a scenario when the phone freezes:

1. Start from fresh soft reset

2. Stylus Out/In to enable StylusLockMode

3. Stylus Out

4. Programs

5. Start CorePlayer

6. Stylus In

7. Stylus Out/In to disable StylusLockMode

8. Stylus Out/In to enable StylusLockMode

9. Stylus Out

10. Exit CorePlayer

11. Stylus In

Hereafter the lock icon does not appear, but it is locked (touchpanel and hardware buttons) as expected. With version 1.3 it goes to Suspend when the backlight goes off, so for StylusLock it means it is still locked internally. However, not reaction on taking the stylus out.

Another scenario also gives the same problem:

1. Start from fresh soft reset

2. Programs

3. Start CorePlayer

4. Stylus Out/In to enable StylusLockMode

5. Stylus Out/In to disable StylusLockMode

6. Stylus Out/In to enable StylusLockMode

7. Stylus Out

8. Exit CorePlayer

9. Stylus In

So the freeze occurs when the lock icon is not shown, thereafter there is no reaction on stylus out, when on power, etc. The only you can do is a soft-reset in this case.

So the StylusLock program is right about the StylusLockMode, but trying to show the lock icon freezes the phone. I am puzzled :confused: if this is a Windows bug or a bug in StylusLock. Because I do exactly the same for adding the lock icon in all the cases.......
[Touch Diamond, MDA Compact IV Themes and Apps] Snoopy71:
Hello,

I really love your app, but i have only one question :

Your app is amazing but we have to take out the stylus with an incoming call.

Is there a way in the future we can activate or deactivate "hang on" and "hang up" hard buttons ?

Thank you for your app :)

PS : Sorry for my poor english
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I will consider to make this configurable (via a registry key).

Till now I have chosen not to have this option, see FAQ:

Q: Why do you not make it possible to disable only the TouchPanel

A: In my opinion, only locking the TouchPanel will not avoid e.g. missed calls, because also the hardware keys can be accidently pressed (although a little bit less likely). There are also problems reported that it unlocks, when you do not answer a call. This version (also locking hardware keys) does not have this problem.
[Touch Diamond, MDA Compact IV Themes and Apps] Curb71:
Would there be any way to make it so you open the program and change between mode 1 & 2 by toggling to which you prefer in the settings of the program? I know its only 3 seconds but sometimes I am busy, just need to check the time but now I have to wait 3+ seconds before I turn the phone off and reinsert the stylus and hope it vibrates or I did it wrong and have change it back to the mode I like.

If not possible thats ok but this seems like a better way IMO. :)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I have uploaded a new version 1.4, where the toggle time is reduced from 3 seconds to 1 second. I also added the possibilty to disable the toggle mode, so the stylus position always controls if the phone is locked or not. See setting stylusAlwaysControl. Hope this is what you want.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I have uploaded version 1.4, where you can overrule the default settings. See lockTouchPanelOnly setting. When set to 1, the hardware keys are not locked.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I finally found the bug with the lock indicator. You can try try version 1.4.
[Touch Diamond, MDA Compact IV Themes and Apps] Curb71:
awesome! thanks so much. Im gonna try it out right now. :D:D:D
[Touch Diamond, MDA Compact IV Themes and Apps] :
Thanxx man!:D:D
[Touch Diamond, MDA Compact IV Themes and Apps] Curb71:
running Juicy's 2.4.1 rom and installed stylus lock last night and it was working great. when I woke up this morning and removed my phone from the charger the stylus app was no longer working. Icon is gone no matter what i do. when I open the program it asks if I want to disable it. if I say yes or no when I open the program again the same thing pops up. uninstalled the app and am going to install it again.
[Touch Diamond, MDA Compact IV Themes and Apps] bennec83:
since version 1.2, i have had shell32.exe crashes.

i really dont understand this, it is so frustrating, this program is nearly perfect, but it went through a spell of locking up on reciept of text messages and deleting the message on reboot (that was mainly on 1.3)

i installed version 1.4 at about 12pm this afternoon, i have used the phone for 6 hours and 15 minutes and i have had 4 shell32.exe crashes.

it seems to be getting confused when it has to display the icon (i know it can be turned off but i want to have it there)

Is there anything i can do to help fix this issue? i am working on exactly how to replicate the crash, but it seems to be happening mostly after ending a call, when the call is ended and the stylus is inserted.

this seems to be the most common time for a crash to happen (for me anyway)

is there anything i can do to give you more information?

thanks
[Touch Diamond, MDA Compact IV Themes and Apps] N3m3515:
i know those crashes. thats why i am waiting for a version without that issue
[Touch Diamond, MDA Compact IV Themes and Apps] bennec83:
has anyone tryed these "Registry Changes"

I have just applied them all different to the default one and none of them worked!!

when setting the DWORD, is it hex or decimal?
[Touch Diamond, MDA Compact IV Themes and Apps] bennec83:
lol, this issue can be solved with version 1.4 by using the registry options to not show the indicator, but unfortunately i have tryed changing the registry entries and not much has happened!!

i think i am doing something wrong!!
[Touch Diamond, MDA Compact IV Themes and Apps] Ddriver:
I have yesterday installing the v1.4 StylusLock with the registry-strings.

This version is the best one till now!

No crashes, no freezen only super all!

Thanks a lot for this one. :-)

@ZuinigeRijder:

I see, you have this afternoon change anything, what exactly?

@bennec83:

Decimal

Greets Ddriver.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Are your sure you did a softreset or disabled the program and started it again?

Because it will read the registry change only when the program starts.

I tried to put the lockIndicator overriding to 0 and now it indeed switched back to 1.1 behaviour. hex or decimal does not matter, because 0 and 1 are the same in both. So for me it is working.....
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Great that it works for you, It took me some time for finding the cause of the sometimes occurring crash in 1.2 onwards, but luckily I found a reproducable use case. And then I could luckily figure out the bug.

I moved some information how to operate from the second post to the first post and made the information consistent with the 1.4 version, also in the third post.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Did you use version 1.4, because in 1.2 onwards there was a bug with the lock indicator? This is fixed with version 1.4.
[Touch Diamond, MDA Compact IV Themes and Apps] Ronnymes:
Great job "nieuwe rijder" :)

It's working great here!
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
This is not so nice for you.

It is the first time I hear from this problem (except for the sometimes freeze I encountered myself too), or maybe I missed a post.

Touch Diamond or Touch Pro?

What ROM?

If others experience the same problem (once in a while), please let me know more details. It is always good to know what works (and what not).
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I was not aware of those crashes, or maybe I missed a post?

Especially because others are happy with it.

Do you have it reproducible?

Touch Diamond or Touch Pro?

ROM version?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Did you soft reset?

Are the registry settings still there after soft reset?
[Touch Diamond, MDA Compact IV Themes and Apps] bennec83:
I have the following, all DWORD and Binary, and i have done multiple soft resets:

HKCU\Software\ZuinigeRijder\LockSettings\

beep 0 - working

lockIndicator 0 - not working

lockTouchPanelOnly 1 - working

stylusAlwaysControl 0 - Dont Know what this does so i cant say!!

stylusOutInToggleTime 1000 - think so the actual value is 0x000003e8 is that correct?

unlockOnACPower 1 - working

vibrate 1 - not working

What do you think? thanks for your help
[Touch Diamond, MDA Compact IV Themes and Apps] elladb:
In the TOUCH PRO it the only version that doesn't stuck is 1.1.....

Can u fix the 1.4 to work with TP?