How to place 90X90 icon - c#

i am creating .cab file installer for windows mobile application,
problem is i need to keep the 90X90 .png image as icon for application.
as per the link
i tried to load the icon,step am following are
1) writing the icon path to registry
2) then loading the icon...
i followed the step mentioned above link,
but the problem is i need to restart my device or emulator to get the 90X90 png icon..
i dont no what is the reason... every time i need to restart..
please let me know, how to fix this probme.. and let me know the reson why its appearing.

The Windows Mobile shell caches the icon. On your first install on a clean device, your icon will be used. After that, the icon will remain in the cache until the device is reset, so if you want to change an icon with an already-installed app, you have to soft reset to force the shell to reload the cache.
Again, this is only a problem when changing the icon for an already-installed app. It's not going to affect your users when they are installing it on a clean device (and therefore probably is not an issue for you at all).

Related

How to prevent Console application from moved?

I'm facing big issue with console app using c# core 2.0.
I still didn't find any right answer to lock console window position.
It is movable by the user.
Main problem is if user move console window to any corner of current resolution then console changing its original size even if I set fixed size in program my certain Text are showing bad after changing cmd size.
Windows snap feature is changing its original size.
I just want to disable windows snap feature without restarting
or
Lock the console app from being moved by the user
Finally i found real solution for this.
I was searching a real solution for my application.
There are many tricks but using reg we need to restart computer.
You can disable it from powershell. You need to call this file from your code.
Here is link.
Check download file at bottom called "DisableAeroSnap.ps1"
https://michlstechblog.info/blog/windows-disable-aerosnap-automatically-window-arranging-and-resizing-while-dragging/#more-951
Cheers !!!

Disable Taskbar in Windows 10

Is there any way to completely disable the taskbar in Windows 10 Home? I have a C# app that I want to display fullscreen on clients' displays without any sign of it running on Windows. It's supposed to run on startup and display a website.
I created a setup that changes most of the Windows settings via registry, like hiding desktop icons and altering logon view, but the taskbar remains visible. Auto hide doesn't satisfy me, because after the system boots the taskbar is still visible until you actually click somewhere on the desktop, and it takes a while for my app to run. I'd really appreciate some help.
When explorer is running, there taskbar will always be visible in some kind (even if it's a small border).
If you want to achieve something like a digital signage solution, you may replace the shell. Changing the shell will also provide some other benefits (most popups / balloontips won't occur anymore).
Be aware that this configuration is effective for all users on the system.
Path to the shell is available at
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Shell
Update:
Just to hightlight:
It is indeed possible to have custom shells per user (see comments).
This is done by specifying a custom location of the shell path that is located in the registry for a given user.
Yes, you can totally disable the taskbar in Windows 10 but it is only temporary until you hover your mouse around the taskbar area.
Here's a tutorial: how to hide the taskbar in Windows 10

Windows 7 pinned taskbar icon changes to default file icon when application is upgraded

I have an application I've written for Windows 7/8 which relies heavily on the new taskbar features - jumplists, taskbar overlays, thumbnail previews, etc. Users are instructed to pin the application to get the most out of it.
Every now and then I release an update for this application and during the upgrade process, when the old EXE is removed and the new one installed, the pinned application will lose its icon -- it becomes the default generic file icon.
From what I can tell, it's a simple icon caching problem, and rebooting the machine or restarting explorer will bring the icon back.
I can have my installer ask the user to reboot the machine after each upgrade, but ideally I'd like to find a way to avoid the icon being lost in the first place. The most brutal approach which would definitely work would be to terminate explorer.exe, but that's not ideal either.
I'm using InstallShield LE for the installer, so a lot of the "hard work" is done for me, but this also limit my options. I know I can execute scripts/programs at certain points during the install though.
How can I avoid the icon being lost, or otherwise programatically force windows 7 to refresh the pinned taskbar icons?
Decided to reboot after each update.

Change pinned taskbar icon (windows 7)

I wan't to customize the icon displayed within the windows 7 taskbar.
When my app is running, I can do it by changing main window icon but, when the app is pinned, the exe's icon is displayed.
How can I set the taskbar icon for my app to an icon different from the one embedded within the exe ?
Not tried, this solution may work but looks dirty.
Edit :
Our app is compiled once but depending on config file, features are enabled or not so it's a product or another. We do not want to compile one exe for each product.
The solution above may not work as many instances of my app can be installed in different pathes (so you end up with the same exe file name but different icons!), is this registry key poorly designed or am I missing something?
EDIT The info below is a bit obsolete; all new Windows 7 bits are now available as a managed API, available here: http://code.msdn.microsoft.com/WindowsAPICodePack
There is a series of articles on the new Taskbar API by the debugging guru Sasha Goldshtein. You should have a look at the Overlay Icons and Progress Bars API.
You can download the sample code from Windows 7 Taskbar Developer Resources on Microsoft Code. What you're looking for is the IMClient sample:
The IMClient sample demonstrates how
taskbar overlay icons and taskbar
progress bars can light up an
application’s taskbar button instead
of relying on an additional dialog or
on an icon in the system notification
area (tray).
(source: microsoft.co.il)
(source: microsoft.co.il)
(source: microsoft.co.il)
I believe this should help you achieve what you want.
When you pin an application to the TaskBar, it simply creates a shortcut in the following directory:
C:\Users\<User Name>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
You should be able to identify where the shortcut is (ie, get KnownFolders and work from there. UserAppData should be the one), and then using P/Invoke (IShellLink), you can alter the icon that the shortcut is setup to use. The machine might need a reboot for this to take effect, but it should work.
If you hold down Shift while right-clicking on the pinned application, and select Properties, you can see the Change Icon button for the shortcut. This is basically what you need to emulate with code.
All of these things can definately be done with code, but whether you think they're any better than the registry setting is up to you.
You can do this by using the library called "Windows 7 Bridge" which is based on the "Windows Vista Bridge".
These are managed wrappers around all the Vista and Windows 7 native functions.
More info can be found here
I don't know if I'm understanding your problem but..
If you create an application and put the icon property of the main window, that icon will appear in the taskbar also. But, if you pin-it to the taskbar, that icon dissapear. Am I right? If so, go to the project properties and in the application tab, put the icon that you want for the exe. Now, you will see that icon in the taskbar when pinned.
I Use the same icon for both things :P
As far as I can tell, for some reason you can't change the icon for a program that's already pinned to the taskbar. To do it, just unpin the program, locate it in the start menu, right click - properties - change icon. then re-pin it to the taskbar, and it will have the new icon!
Have a look at this blog. He does a series of blog posts about programming the Windows 7 taskbar, so maybe that will point you in the right direction.
I can't test this right now unfortunately, but perhaps just creating a regular, good old shortcut might solve the problem? Create a shortcut to the app, change the icon, then pin the shortcut instead of the app itself?
Will check when I can next get access to my Windows 7 machine...
Right click on the pinned icon, in the popup you see the programs title, there right click again and go to properties. There you are able to change the icon by clicking on the button
"change icon". For me it needed a reboot to finish the changes.
If you want to have a shortcut in the taskbar that goes directly to somewhere useful, such as your "My Documents" directory. The easy fix . . .
Drop a folder into the taskbar ( which creates a shortcut to images ). Navigate to the directory where that shortcut was placed, right click on the shortcut and select "properties" to change the target. Select the "general" tab to change the name of the shortcut. The shortcut was placed here:
C:\Users[user]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
You can navigate to this directory and edit the properties of the "images" shortcut.

Automatically run programs on startup and stop applications from memory on PPC

I have to stop applications when the window is closed. The window stays in the memory when click the (x) button. How can i remove the app in memory? Also another question is that i want the application to be installed when hard restart the pocket pc, how can i do it?
Thanks
By default the form will just hide when you click the X in the top right. You need to set the "MinimizeBox" property of the form to "False" for the application to close instead.
Installing the application on hard restart (often referred to as cold boot) requires that you put a CAB file for the application on the flash (persistent) memory of the device. You will then normally have to write a script and place that somewhere to call the CAB. This can vary from device to device so you'll have to look that one up.
Setting the form's MinimizeBox property to False causes the OK button to appear.
The Ok button is for closing the application instead of minimalizing
To prevent to application from minimizing which is the default behavior for PocketPC applications, set the MinimizeBox option to false on the form.
As for your second option that might be trickier because it depends on the PDA. If it has persistent memory you could put it there, and find a way to run the CAB file during initialization.
[Update]
It would appear that there is a Startup Folder in the windows menu. Perhaps you could write a utility that checks if your application is installed and if not launches the CAB installer.
The default behavior is indeed minimizing the application. Using a custom task manager which replaces the [x] you can tune this behavior. Some vendors (for instance HTC) include a custom taskmanager exactly for this purpose.
A generic but good task manager is WkTASK, here is the relevant feature description:
X button
Using the X button, you can
use some actions as follows:
Tap: really close
Tap&Hold: show context menu
Drag: some gestures (To show a program launcher, drag toward down. To
show Today, drag toward left.)
WkTASK offers a lot more, but you can fine tune it to do only what you want.

Categories