ukjock Posted February 17, 2004 Posted February 17, 2004 Can somebody please help me on how to make text flash using a timer. Is using a timer the ideal way or is there an easier way!? I wanted to use: If Label2.ForeColor.Red Then Label2.ForeColor.Empty() Else Label2.ForeColor.Red() but i get system.color can not converted to Boolean. Can somebody please help me... I am pulling my hair out! Regards Chris Quote ----------------- It�s always funny until someone gets hurt� Then it become hilarious!
samsmithnz Posted February 17, 2004 Posted February 17, 2004 Can somebody please help me on how to make text flash using a timer. Is using a timer the ideal way or is there an easier way!? I wanted to use: If Label2.ForeColor.Red Then Label2.ForeColor.Empty() Else Label2.ForeColor.Red() but i get system.color can not converted to Boolean. Can somebody please help me... I am pulling my hair out! Regards Chris try something like Label2.ForeColor.white or Label2.ForeColor = Label2.backcolor instead of that empty statement Quote Thanks Sam http://www.samsmith.co.nz
ThePentiumGuy Posted February 18, 2004 Posted February 18, 2004 i dont think its that either lol try If Label2.Color = Color.Red Then Label2.Color.Empty() 'i have no idea whether this command works Else Label2.Color = Color.Red Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Wessel Posted February 18, 2004 Posted February 18, 2004 If you want to use the regular Control color, use Color.FromName("Control"); //or SystemColors.Control; Quote
*Experts* Nerseus Posted February 19, 2004 *Experts* Posted February 19, 2004 Seems easiest to me if you: Don't do any flashing :) OR Clear the text and then reset it - always have the color as Red. To "save" the text, maybe put the text in the Tag property. Something like: ' Set this in the designer: Label2.Color = Color.Red ' In your timer/wherever If Label2.Text.Length = 0 Then Label2.Text = Label2.Tag.ToString() Else Label2.Tag = Label2.Text Label2.Text = String.Empty End If -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.