Transparency is a feature in .NET that can make your applications with that Vista/Windows 7 feel. This simple code excerpt lets you adjust the Opacity on the Form with only marginal resource consumption with a Timer Control.
public string upOrDown = "down";
private void tmrOp_Tick
(object sender, EventArgs e)
{
if (upOrDown == "down")
{
this.Opacity = this.Opacity - 0.01;
}
else
{
this.Opacity = this.Opacity + 0.01;
}
if (this.Opacity < 0.81)
{
upOrDown = "up";
}
if (this.Opacity > 0.99)
{
upOrDown = "down";
}
}
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.
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