Close VB.net application and make icon disappear - vb.net

Executing the exe file,
it will open the program and create a icon on the right-bottom windows status bar.
After processing some functions,
it will call Environment.Exit(Environment.ExitCode) and Application.Exit()
and close the application.
But the icon on the windows status bar still exist,
how to make the icon disappear?

when you kill your application you can set your icon to nothing. So that your application Icon will remove from system tray.
YourForm.Icon = Nothing

Related

Windows system tray icon not clear after update

I'm trying to add a notification icon to system tray to show my application special status.
If showTrayIcon Then
trayIcon.Visible = True
Else
trayIcon.Visible = False
End If
After hide the icon it still shows on the system tray. Unless the mouse move on it. This can be a problem of Windows OS. I'm asking here, is there a way to fix this in my side?

vb desktop icon different from application icon

I am trying to set the icon of my application. I set the icon once before by changing the property of the form and the property of the project. Now I am trying to change the icon to a different one. The icons of the form and the application have been successfully changed, but when I copy the application to the desktop, the desktop icon still remains the previous one. Can anyone please tell me how to change the desktop icon?
Thanks,
Kai
If you change the icon properly on the form it should get visible in the Taskbar immediately as soon as you start your application.
However even if you did change the project icon properly and therefore your executable has the correct (new) icon (check that in your \bin-folder) you can get the wrong (old) icon from the desktop because you system might retrieve it from the icon cache.
Please check the following link to understand that topic and to see how you can enforce windows to renew its icon cache.
Win 7--: http://www.winability.com/repair-windows-desktop-icon-cache/
Win 8++: http://www.winability.com/how-to-erase-icon-thumbnail-cache-windows-8/

Change Icon on Task Bar for VB.net

I have a program in vb.net which is ready to be published.
Its a small detail, but I'd like to change the icon on both the published app shortcut on my desktop, but more importantly on my taskbar (like where the chrome circle shows up).
Is there any way to accomplish this?
To change the main icon for your application, go to the "Application" tab under the project property page, and change the "Icon:" combo box.

Hide application icon from dock, but keep icon in task switcher?

It's possible to show/hide the application's icon from both the Dock and the Task Switcher by setting the "Application is agent (UIElement)" property to YES/NO.
However, is it possible to have an application show in the Task Switcher (Cmd + Tab), but not appear in the Dock?
Thanks.
I'm reasonably certain that this is impossible, and that the dock and the app switcher are using the exact same list to decide what should appear in them.
The reason for my believing this is that there's actually a procedure for removing an app's icon from the Dock, while the target app is running, that has nothing to do with the LSUIElement key. (It consists, essentially, of renaming/moving the app bundle and then restarting the Dock.) Even doing that, though, the app doesn't appear in the switcher.
(You can find the full procedure on macosxhints.com, if you're interested.)

AIR modal screen

I am developing an AIR application where I need to display a Modal Window.
The screen should fill the entire desktop including the Task Bar.
If the user wants to exit the screen, he should press Windows+D option or activate Task Manager.
Can any one post some sample code?
To get rid of taskbar, switch to fullscreen mode with
stage.displayState = StageDisplayState.FULL_SCREEN;
User always can switch to another window with Alt-Tab (on Windows), AIR cannot "lock" screen to prevent that.
Try the example here
http://flex4fun.com/2010/12/01/flex4-popupmanager-example-change-modal-color-and-click-modal-close-popup/
PopUpManager.createPopUp(this, TitleWindow, true)
last argument makes the popup "modal".
http://docs.huihoo.com/flex/4/mx/managers/PopUpManager.html#createPopUp()