Various Scripts and Application Code Segments for .NET, VB, C#, C++, C, Java, JavaScript, HTML, Python, Perl, AutoIT, Batch, ASP Classic, Objective-C, Swift, Unreal Engine 4, Unity3D & others. Also contains numerous IT tidbits, procedures, and tricks including Technology Hacks on various platforms.
Thursday, September 23, 2010
Animating SystemTray Notification Icons in C#
This does as the title suggests. In the SystemTray in order to animate the icon, you have to load the icon from resources from within the Project. This piece of code in the Timer event will change the image every given interval. I used this snippet in my S Cubed program, see screenshot above.
int x = 0;
private void timer2_Tick(object sender, EventArgs e)
{
Icon ico = Properties.Resources.workstation_locked_Vista;
Icon ico2 = Properties.Resources.workstation_locked_Vista_on;
Image log1 = Properties.Resources.puter1;
Image log2 = Properties.Resources.puter2;
if (x==1)
{
ntyS3.Icon = ico;
imgS3.Image = log1;
x = 0;
}
else
{
ntyS3.Icon = ico2;
imgS3.Image = log2;
x = 1;
}
}
Subscribe to:
Post Comments (Atom)
Generating "Always On Top" NSWindow in macOS across all detected displays
Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift Langues, you m...
-
In Unreal Engine 4 you will eventually need Linear Interpolation between two values to do something like ping pong between two float val...
-
Recently Possess () has been deprecated from UE4 , and when writing classes based on AAIController you have to use the function OnPossess ...
-
Often we intermingle C++ and Blueprints, and need for the two to communicate. With Behavior Trees, using ENUMs is an everyday occurrence an...
No comments:
Post a Comment