Classe VisualStyleElement.TrayNotify.AnimateBackground
Aggiornamento: novembre 2007
Fornisce un oggetto VisualStyleElement per uno sfondo animato dell'area di notifica. Questa classe non può essere ereditata.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
La proprietà Normal della classe VisualStyleElement.TrayNotify.AnimateBackground restituisce un oggetto VisualStyleElement che rappresenta uno sfondo animato dell'area di notifica, che si trova all'estrema destra della barra delle applicazioni.
Nota sulla piattaforma Windows XP Home Edition, Windows XP Professional x64 Edition , Windows Server 2003:
Gli stili di visualizzazione sono supportati solo su queste piattaforme.
Nell'esempio di codice riportato di seguito viene illustrato come creare un oggetto VisualStyleRenderer con l'oggetto VisualStyleElement restituito dalla proprietà Normal. Per eseguire questo esempio, incollare il codice in un form Windows Form. Gestire l'evento Paint del form e chiamare il metodo DrawVisualStyleElementTrayNotifyAnimateBackground1 dal metodo di gestione eventi Paint, passando e come PaintEventArgs.
public void DrawVisualStyleElementTrayNotifyAnimateBackground1(PaintEventArgs e) { if (VisualStyleRenderer.IsElementDefined( VisualStyleElement.TrayNotify.AnimateBackground.Normal)) { VisualStyleRenderer renderer = new VisualStyleRenderer(VisualStyleElement.TrayNotify.AnimateBackground.Normal); Rectangle rectangle1 = new Rectangle(10, 50, 50, 50); renderer.DrawBackground(e.Graphics, rectangle1); e.Graphics.DrawString("VisualStyleElement.TrayNotify.AnimateBackground.Normal", this.Font, Brushes.Black, new Point(10, 10)); } else e.Graphics.DrawString("This element is not defined in the current visual style.", this.Font, Brushes.Black, new Point(10, 10)); }
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition , Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.