Winston Posted March 26, 2003 Posted March 26, 2003 Hey guys does any of you know how to make a form flash like how wen u get a new message in msn the window is flashing in the taskbar i would like to know how to do this in vb.net thanks Quote
Leaders dynamic_sysop Posted March 26, 2003 Leaders Posted March 26, 2003 (edited) Edited, see below:) Edited March 26, 2003 by dynamic_sysop Quote
Leaders dynamic_sysop Posted March 26, 2003 Leaders Posted March 26, 2003 Ok i've made a sample for .NET , this code i made and it's not a vb6 code:) , the timer i have set to 700 in this case. Private Declare Function FlashWindow Lib "user32" _ (ByVal hwnd As Integer, _ ByVal bInvert As Boolean) As Long Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick Call FlashWindow(Me.Handle.ToInt32, True) End Sub Protected Overrides Sub OnResize(ByVal e As System.EventArgs) If Me.WindowState = FormWindowState.Minimized Then Timer1.Enabled = True Else Timer1.Enabled = False End If End Sub enjoy:) Quote
*Experts* Nerseus Posted March 27, 2003 *Experts* Posted March 27, 2003 For the record, I *hate* when windows flash. I turned the option off in XP because it annoyed me. The only time I find it acceptable is on a LONG-running process to alert me that it's done or when I've set a breakpoint in VS.NET and it hits but a form is on top (then the IDE flashes so that I can tell it's on the breakpoint and not still running). That's just my opinion - maybe you've got a good reason to want to flash. -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
Winston Posted March 27, 2003 Author Posted March 27, 2003 For the record, I *hate* when windows flash. I turned the option off in XP because it annoyed me. The only time I find it acceptable is on a LONG-running process to alert me that it's done or when I've set a breakpoint in VS.NET and it hits but a form is on top (then the IDE flashes so that I can tell it's on the breakpoint and not still running). That's just my opinion - maybe you've got a good reason to want to flash. -Nerseus i see what u mean, my program is a task schedular and the reminders are shown exactly like the MSN method, so yeah, once a alert pops up i cant just show a window in the taskbar without telling the user there is one coz not much average users notice something new has just popped up Quote
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.