{SOLVED} Hide to system tray - Windows Mobile Development and Hacking General

Spent most of the evening searching various forums/newgroups before giving up and asking for help on this one.
Has anyone managed to work out how you can minimise your application to the system tray icon?
I had hoped this thread ( http://forum.xda-developers.com/showthread.php?t=274918&highlight=tray ) would reveal the secret, but whilst it does 'hide' my application, no icon is shown on the system tray for me to reactivate.
Would really appreciate some help on this.
Using VS2005, phone is Artemis and got the latest SDK for Mobile 5.

i am pretty sure i saw that effect once, on wm03. but what could that be....
upd: ehh damn i read your link..
how to remove my post...?

I take it you are using C# / VB.NET?
Not sure how to implement the solution in those, I only know C++.
There is no 'minimize to tray' function in windows - mobile or otherwise. The effect is achieved by two operations:
1) Hide your program window.
2) Create a notification icon in the tray using Shell_NotifyIcon API.
You can find full documentation about it in MSDN or VS help files.

Thank Levenum, the "Shell_NotifyIcon" call seems to work brilliantly.
Thanks again for the pointer, appreciated.

I'm a noob
levenum said:
I take it you are using C# / VB.NET?
Not sure how to implement the solution in those, I only know C++.
There is no 'minimize to tray' function in windows - mobile or otherwise. The effect is achieved by two operations:
1) Hide your program window.
2) Create a notification icon in the tray using Shell_NotifyIcon API.
You can find full documentation about it in MSDN or VS help files.
Click to expand...
Click to collapse
I don't have a single clue how to achive this, I want to hidem my tray bar on my deviece but I can't, I have not Idea what the Shell_NotifyIcon API is and I don't know how to hide my program window.

~J~: Glad I could help
fnordelus: I am not quite clear on what you want to do:
Do you want to get rid of the tray (the little icons at the bottom of your today screen) so you would have more room for plugins?
If that is the case then you just need to delete some shortcuts from windows\startup - but be careful! Some stuff in there you will need. If you tell us what device you are using and what shortcuts you have in that folder we can tell you what to delete and what not.
If you are writing a program and want to minimize your window to tray (put an icon in the tray when your window is not shown) then the first thing you must do is tell us what language you are using. If you do not know how to hide a window in your own program it is to early for this kind of tricks. You need to get a good book on Win32 programming and read it fisrt.

Related

Chage Icons?

Haya guys and or galls...
I'm trying to edit the icons of the shortcuts in my start menu.
I want to use this, so that I can use the Icons of programs like tomtom to startup via the overclock tool....
But now, sice the shortcut starts with the omapclock tool, the icon is the same as the tool...
Also, there is an app called flitsnav, which also launches Tomtom, and I want to use the tomtom icon rof this shortcut...
I can't seem to find the solution in this forum anywhere, but maybe I looked over it in my search..
Can someone help me???
http://forum.xda-developers.com/viewtopic.php?t=40230&highlight=completeness
V
hmmm
okay..tnx for the advice..
Although I'm not really sure what all that means ou guys wrote there..
No easier way? just to change the icon of a .exe?
Anyway thanks..
p50kombi: if you want to change the icon for the executable, which you don't (since you want to change icons for shortcuts), you would use a resource editor on your PC. That's not too easy, but it's doable.
Using custom icons on shortcuts on the PDA is not difficult.
Basically, copy this into notepad, and call it VJMail.lnk
Code:
38#\windows\tmail.exe?\windows\DIM.exe,0
38
- Ignore this (it's the length of everything after #)
\windows\tmail.exe
- this is the app you want to launch
?\windows\DIM.exe,0
- this is the icon it should show instead of its default one
- it means, take the first (ie 0th) icon in \windows\dim.exe as the icon
It's not hard. This is just an example. Use your own programs etc of course.
V
i'll try it right away..
Thanks VJ!!!!
It worked!!!!
Thanks VJ.....
It wasn't that hard afterall indeed!!!
Anyone got any way of extending the backlight of the keyboard allready?

Custom icons or icons from Settings??

OK so since I got such a quick answer on my "spacer" question, I thought I'd try it again .
I have made a shortcut to the today setup in the settings. Only problem is that I need an icon for it. I saw in another post where someone created an exe file just for the icon basically. Could someone explain how to do that.
An alternative would be if I could use the icon from Start - settings - personal - today. But I have Icon Viewer as well as RViewer and can't find it anywhere.
I'd rather be able to use a custom icon, not only for this app but for others, but help on either would be greatly appreciated.
You want to use an icon dll.
Easiest way - download PHM Tools, find the icon dll, download Microangelo on your PC, use librarian, rip out the icons, make your own icons in studio, drop them into the now empty dll, and use that dll as your new icon dll.
In order to use the new icons, you need to know how to specify icon resources in shortcuts. Search against my user name for the word "completeness".
V
thanks VJ, I'll check it out when I get home tonight.
I also came across this while following a link from aximsite.
The Shortcut Editor was released on this forum first AFAIK
Have a search on our forum.
But have a read through my posts on creating custom shortcuts, it's very easy and will teach you the theory behind the practise.
I think you asked specifically about use of a DLL Icon library. Perhaps not... but it's a useful technique either way.
v
yeah VJ you're right. The aximsite link pointed me here to good ol XDA
Which PHM tool do I need? Is it the shortcuts app in PHM Plus?? I'm beginning to think I'm in over my head here.
TIA

Getting Running programs in the tray

On my XDA mini, I had the convenient little icon in the tray (at the bottom of today screen) that was a shortcut to the running programs box in the settings menu.
How do I enable this on the Wizard? I don't want to have to install a whole task manager program, when the one built in works just fine. I just need to get to it easier.
try WM5NewMenu by saman, where you can set a shortcut for this particular setting, among others, through any of the softkeys or the buttons. it's a drop-down menu list, though, not an icon.
http://forum.xda-developers.com/viewtopic.php?t=40088
PHMTray.
V
Thanks, PHM tray is closest to what I was looking for, but is it windows mobile 2003 only?
I really would just like to have that little icon that goes to the memory screen back. The Magician had this, and I think other models do too.
This is the solution
Create a shortcut that has the following contents
44#ctlpnl cplmain.cpl,4,2?deviceinfo.exe,-103
You can do this by creating a shortcut to any program, then using activesync explorer to find it, copy it, and paste it on the desktop, open it with Notepad, and edit it. Start with a PPC shortcut so that it in the right character set.
Then return it to a folder on the PPC and put it in PHM Traylaunch. It gives you one touch access to the Settings/Memory program. The part after the ? controls the visual icon.
thanks! I'll try this...
though, I am sure this must be possible through some sort of registry setting...
I am digging through my EXTROM on my old XDA mini to see if I can find out
after all this, I just resorted to putting the shortcut in my start menu... it'll do for me I guess... :?
I've attached the link for those who want it.
I like things to be simple. No extra software to install, no complicated settings. Just click it and done!
thanks for all your help guys

Remapping Inner Circle and Messenger key?

Are there any tools or registry hacks available to remap the Inner Circle and Messenger keys?
I can think of more usefull programs to map to a dedicated hardware key instead of these...
TIA
Do you actually need to use the Inner Circle and WLM functions on your device?
I ask because the only way so far which I have found to remap those key buttons is to create Mortscript .exe files called InnerCircle.exe and WLMMessenger.exe, each pointing to respective InnerCircle.mscr and WLMMessenger.mscr scripts which run the programs you want. You would then drop these into your \Windows folder, overwriting the original InnerCircle.exe and WLMMessenger.exe files (having first removed the Read-only / System etc. properties from the original files using Total Commander or Resco Explorer). Clearly this will then render the Inner Circle and WLM functions inoperative on your device - not too much of a problem for me as I have no need for either. If you want to regain their functionality you simply need to delete the two .exe files you created and the originals will regenerate from ROM. Note that I found I needed to use Mortscript to get this to work. Simply copying a renamed .exe file of the actual program you want to assign to the button did not work.
I know it sounds ridiculous but none of the "regular" methods for changing hardware key assignments seem to work - I even tried editing the keymap. There is a "Short_Circle" lnk file in \Windows - changing the target of this seems to make no difference. The various registry entries which I have used successfully in previous devices made no difference. It's as if there is some sort of ROM-level hardware association between the Inner Circle key and the InnerCircle.exe file (same deal with WLM).
If anybody can come up with a more elegant solution to this it would be welcomed - I'm a reasonably adept WM user but I'm pretty sure somebody more knowledgeable can do better. If you don't have a Snap then please be a little cautious about being gung-ho with suggestions (!) - I know this is fairly well-trodden territory on xda-developers but the setup with the Snap seems like it might be a bit different. Cheers
P.S. Don't be tempted to delete or disable the Windows Live key from HKEY_LOCAL_MACHINE\Services - this will prevent the Windows Live service from loading, which might be good in various ways, but it's needed for the Windows Live key to work (even if the WLMMessenger.exe which is being executed is running something else).
Psmit said:
Are there any tools or registry hacks available to remap the Inner Circle and Messenger keys?
I can think of more usefull programs to map to a dedicated hardware key instead of these...
TIA
Click to expand...
Click to collapse
Use Wordpad.
jhwo99 said:
Use Wordpad.
Click to expand...
Click to collapse
What are you doing with Wordpad?
jhwo99 said:
Use Wordpad.
Click to expand...
Click to collapse
And how would Wordpad help me remap the InnerCircle key?
JC6 said:
Do you actually need to use the Inner Circle and WLM functions on your device?
Click to expand...
Click to collapse
Thanks for the extensive reply. I've been using my Snap for a few weeks now and still don't understand what the marketing-fuzz of InnerCircle is all about.
The InnerCircle app I don't need, at all. It does nothing that can't be done with a server-side rule. So no issue that it is completely disabled in the OS. Messenger is a nice to have for occasional use, but a dedicated button is just a wasted button IMHO.
I'll check out your suggested solution.
A link to the task manager instead of the inner circle prog would be cool.
Psmit said:
And how would Wordpad help me remap the InnerCircle key?
Click to expand...
Click to collapse
Open Windows and change the key by renaming it to the program you want.
Svenitos said:
A link to the task manager instead of the inner circle prog would be cool.
Click to expand...
Click to collapse
I'm using good-old Xbar for that, using the trackball!..I would be lost without a taskswitcher/manager in WM!
Svenitos said:
A link to the task manager instead of the inner circle prog would be cool.
Click to expand...
Click to collapse
You can do that using the procedure outlined in post #2 above. This is exactly how I have mine set up
jhwo99 said:
Open Windows and change the key by renaming it to the program you want.
Click to expand...
Click to collapse
Can you explain how you did this? I tried the following techniques (which have worked with previous WM phones) and none of them worked:
1. Changing the target of Inner Circle.lnk
2. Changing the target of Short_Circle.lnk
3. Fiddling with the keymap file (although I'm not sure I exhausted this fully).
4. The situation with HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Keys doesn't seem to be the same with this device as with my previous WM devices.
It's almost as if there is a direct rom-level association between the button and the InnerCircle.exe file - perhaps this is not the case with some of the other Snap ROMs. The only way I was able to "remap" the button was using the Mortscript method I explained in post #2 of this thread. I recognise this is an inelegant solution and would welcome a better method (although it doesn't really cause me a problem as I don't need Inner Circle or Windows Live Messenger - in fact I'd rather they weren't even on the phone, I'm sure they will be removed when we start seeing cooked ROMs).
Im kind of a noob to WM.. so is it possible to explain it slightly more detail what needs to be done.. such as creating a mortscript exe.. i just want to remap the inner circle key to the task manager btw
Hi, I am a newbie to WM. Would like to find out whether there has been any other ways of doing this remapping? Thanks in advance!
hallo i'm using omnia pro and having the same problem here, need some expert advice.
I already tried the AE Button plus but it's seem to not recognized the button I want to re map (PIE and WLMessenger button)
i got the same problem with my htc snap. anybody knows how to change the wlm and innercircle keys?
maybe some of the rom cooking experts can write a rom or cook into next rom?
Custom ROM already has it, in parts
Guys.
ookba has done some button customization on his roms.
Long-press power button will bring the Quick List menu.
You can change though settings:
- Press Inner Circle: default is CeleTask.
- Long-press Home: default is Quick List
Check the ROM here:
http://forum.xda-developers.com/showthread.php?t=551642
I'm waiting for a version where we can change the Messenger and Mail/SMS key also.
[]'s
Cris
For some reason I cannot set (remove) the flags "Read Only" and "system" from InnerCircle.exe....Either with Resco Expolrer and Total commander, both applications seem to properly change the property flags, but when I check again the file properties, the "read only" and "system" are back.
So I am stuck with remapping the Inner circle button.
If anyone has some advise, that would be great.
Tnks
Bump! (I know it's an old thread). Anyone find a way to remap the messenger key??
It seems to me the messenger key somehow is hardwired to launch \Windows\Start Menu\Messenger.lnk. Let Messenger.lnk point to your favorite application and it gets started by the messenger key. This solution is not that elegant since it clutters the start menu, but at least for me it works.
Have fun,
Erik
Hi,
how exactly did you update Messenger.lnk? What did you wrote as a path? Some special characters?
EDIT: solved, I forgot to put double quote. Now it works also for me.

Need a lot of help with my app!

Hey guys
I'm creating a Windows mobile 6.1 application and now i need a code that activates the backlight camera just by a buttonpress. Anybody that can help me, maybe supply me with a little exe or a code sample? I'm writing in C#...
Second, I wonder how to execute a command when the user of my application presses the X button in the right corner of the 6.1 system. I want a dialog popup menu to show and ask the user to quit or no. Hopefully you'll understand what i mean.
And last, i want to "disable" the visual keyboard icon shown between the mainmenu lists... i don't want it to show, if you get what i mean
Best regards
None of the currently 8000 peoples that can help me??
well, when I programmed some software with Object Pascal for WinMo 6.5 I spent hours trying to find some code to hide the keyboard icon, but I never solved the problem... But the icon depends on the program the application is started from. That means if you start it from File Explorer it is shown in the middle, if you start it from Total Commader it is shown in the lower left corner and if you start it from the start menu (shourtcut) it is hidden.
Maybe this is the same in C#...

Categories

Resources