[Windows Mobile Development and Hacking General] MichelDiamond:
Great Work - and a nice workaround!

But before making a lot of dots ins Titanium - I would like to go back of your origin question you've replaced meanwhile with the explanation of the color-buttons.

You asked for a parameter with "OnInitComplete" - I think I assume why it didn't work - but I have only some proposals which could be tried.

At first - in very much languages like C++, Java, ASP.net etc. is "InitComplete" a known event from Windows. And a "On" before declares the overwritables methods.

But: "InitComplete" is always an event, that is triggered, when the graphic is initialized. When you can see it - then this event won't be triggered - and so no effect.

But - I think they are all windows programmers who made Titanium/ WinMo - and where's a "OnInitComplete" - there are some other Event-Handlers not far away ;)

here is a little Link to a Tech-Note from ASP.NET - with a nice overview of Event Handling and when it's triggered in a life cycle of an item (don't wonder about "page"... for windows are buttons almost the same... ) :

http://fuchangmiao.blogspot.com/2007/11/aspnet-20-page-lifecycle.html

And I think there must be something for Control Events to... at first I would assume simply "OnClick" or "OnActivate"

The question: Where did you found this "OnInitControl" in code of Titanium - I've never seen it somewhere? Perhaps we can have a look there, if there are other Event handlers.

Then - second problem:

The Event "OnInitControl" is for the whole graphic - so for the pressed AND unpressed button - so I would assum that the "OnClick/OnActivate/OnShow" could be also in the Code of the Button perhaps - but perhaps it was the right position...

Then the Parameter - I think you've still tried such things like ":MSWRLSMGR" too, yes? (CommManager)

Third Problem: The XML is always a view - and I only see sources - nothing for executes... that's normal for Windows Views - the Events make the Execution.

But sometime I see a little thing... when theres a call to a hook in a DLL for getting texts or images - especially to "cechomeres.dll" with a following number.

And a DLL is nothing else than an Executable without a defined Entry Point.

OK - here are some proposals (which cab be combined) :

1. Perhaps a little decompilation of this DLL could help - or somebody who could try to add a function to an unused number in this dll (smaller than 32767 , I think only Integers are allowed).

Then try to call it by "cechomeres,8888" - when 8888 is the free number. I don't know which number is for what... perhaps theres still something to get out.

2. Try other events - "OnClick" is still my Favorite - and then a call in UNC-Notation perhaps... (file: .... .exe /.mscr)

3. If a view cannot call an Executable - there must be something, which could handle public events. A Program in C++, C#, .net, Java, ... which could catch the event and overwrite the Windows-Parent-Class and makes a Call between.

But how to find out - I don't know if its possible - but is there a program similar to "Spy++" on Windows - which can show the active public events? It would be enough if this Tool could record events with timestamp to a Text-File - so we could see, which events are triggered by clicking the button and perhaps we could see the parent classes and some properties, too.

Then we could try to write a "Catcher"-Program which overwrite the found puplic event... I'm not sure - but MortScript has nothing for events, right?

But it's indifferent in which language.

The catcher -Programm must only know which Buttons are possible of each Panel - and know which should be called when this event is seen...

Almost the same like your color-Buttons - but invisible and no limitations with keypress-Times or differences of colour-Codes in compressed Formats.

But at First - where did you found "OnInitComplete" to have a look for something more there?

And: Is there a Tool for WinMo like "Spy++" ?

Sorry - I know Titanium only since short time and WinMo 6.5, too. But it's funny and you make fantastic Tutorials to your Find-Outs - thank you. Will be funny to use it for some new PlugIns - with much more nearer Possibilities to a intuitive Surface suitable to the specific things for what a PlugIn is written.

BTW: I have noticed a limitation to use Graphic-Elements (same for Text-Elements) within a Titanium-Layer - so that graphics dissapear which are correct defined in the .plg when you use more than the maximum amout (21 ? )

When you make color-Buttons you would need more Graphics in a layout - and so you could reach the maximum much more easierer... do you know a workaround without merging graphics - because when I'd have 4 Pages each with only 5 graphics - than there's no more space for additional graphics.

Michel