/// <param name="title">Title text displayed in the NotifyWindow</param> /// <param name="text">Main text displayedin the NotifyWindow</param> public NotifyWindow(string text, string title = null) { Title = title; Text = text; SetStyle(ControlStyles.UserMouse, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); // WmPaint calls OnPaint and OnPaintBackground SetStyle(ControlStyles.DoubleBuffer, true); ShowInTaskbar = false; FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; StartPosition = System.Windows.Forms.FormStartPosition.Manual; // Default values BackgroundStyle = BackgroundStyles.VerticalGradient; ClockState = ClockStates.None; BackColor = Color.SteelBlue; GradientColor = Color.WhiteSmoke; PressedColor = Color.Gray; TitleColor = SystemColors.ControlText; TextColor = SystemColors.ControlText; WaitOnMouseOver = true; ActualWidth = 130; ActualHeight = 110; WaitTime = 10000; }
public NotifyWindow() { this.closePressed = false; this.textPressed = false; this.titlePressed = false; this.closeHot = false; this.textHot = false; this.titleHot = false; base.SetStyle(ControlStyles.UserMouse, true); base.SetStyle(ControlStyles.UserPaint, true); base.SetStyle(ControlStyles.AllPaintingInWmPaint, true); base.SetStyle(ControlStyles.DoubleBuffer, true); base.ShowInTaskbar = false; base.FormBorderStyle = FormBorderStyle.None; base.StartPosition = FormStartPosition.Manual; this.BackgroundStyle = BackgroundStyles.VerticalGradient; this.ClockState = ClockStates.None; this.BackColor = Color.SteelBlue; this.GradientColor = Color.WhiteSmoke; this.PressedColor = Color.Gray; this.TitleColor = SystemColors.ControlText; this.TextColor = SystemColors.ControlText; this.WaitOnMouseOver = true; this.ActualWidth = 130; this.ActualHeight = 110; this.WaitTime = 0x2af8; }
public frmNotifyWindow() { SetStyle(ControlStyles.UserMouse, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); // WmPaint calls OnPaint and OnPaintBackground SetStyle(ControlStyles.DoubleBuffer, true); ShowInTaskbar = false; FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; StartPosition = System.Windows.Forms.FormStartPosition.Manual; TopMost = true; // Default values BackgroundStyle = BackgroundStyles.VerticalGradient; ClockState = ClockStates.None; BackColor = Color.WhiteSmoke; GradientColor = Color.LightCyan; PressedColor = Color.Gray; TitleColor = SystemColors.ControlText; TextColor = SystemColors.ControlText; WaitOnMouseOver = true; ActualWidth = 250; ActualHeight = 80; WaitTime = 6000; }
public void _SetRegistryForNewBackground(string tempPath, BackgroundStyles style) { RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Control Panel\Desktop", true); if (style == BackgroundStyles.Fill) { key.SetValue(@"WallpaperStyle", 10.ToString()); key.SetValue(@"TileWallpaper", 0.ToString()); } if (style == BackgroundStyles.Fit) { key.SetValue(@"WallpaperStyle", 6.ToString()); key.SetValue(@"TileWallpaper", 0.ToString()); } if (style == BackgroundStyles.Span) // Windows 8 or newer only! { key.SetValue(@"WallpaperStyle", 22.ToString()); key.SetValue(@"TileWallpaper", 0.ToString()); } if (style == BackgroundStyles.Stretch) { key.SetValue(@"WallpaperStyle", 2.ToString()); key.SetValue(@"TileWallpaper", 0.ToString()); } if (style == BackgroundStyles.Tile) { key.SetValue(@"WallpaperStyle", 0.ToString()); key.SetValue(@"TileWallpaper", 1.ToString()); } if (style == BackgroundStyles.Center) { key.SetValue(@"WallpaperStyle", 0.ToString()); key.SetValue(@"TileWallpaper", 0.ToString()); } SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, tempPath, SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE); }
public NotifyWindow2000() { SetStyle(ControlStyles.UserMouse, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); ShowInTaskbar = false; FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; StartPosition = System.Windows.Forms.FormStartPosition.Manual; // Defaults BackgroundStyle = BackgroundStyles.VerticalGradient; ClockState = ClockStates.None; BackColor = Color.SteelBlue; GradientColor = Color.WhiteSmoke; PressedColor = Color.Gray; Sticky = true; WaitOnMouseOver = false; MaxMinutes = 30; ActualWidth = 130; ActualHeight = 110; }
public NotifyWindow() { SetStyle (ControlStyles.UserMouse, true); SetStyle (ControlStyles.UserPaint, true); SetStyle (ControlStyles.AllPaintingInWmPaint, true); // WmPaint calls OnPaint and OnPaintBackground SetStyle (ControlStyles.DoubleBuffer, true); ShowInTaskbar = false; FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; StartPosition = System.Windows.Forms.FormStartPosition.Manual; // Default values BackgroundStyle = BackgroundStyles.VerticalGradient; ClockState = ClockStates.None; BackColor = Color.SteelBlue; GradientColor = Color.WhiteSmoke; PressedColor = Color.Gray; TitleColor = SystemColors.ControlText; TextColor = SystemColors.ControlText; WaitOnMouseOver = true; ActualWidth = 130; ActualHeight = 110; WaitTime = 11000; }