[RESOLVED] make your program blink(orange) in taskbar like msn messenger
I'm just creating a chess program and connecting through tcp.
I want to alert the user, in a similar fashion to that of msn messenger when one receives a message. Making the program/conversation window's in the taskbar blink orange.
Anyone know how? thanks
Re: make your program blink(orange) in taskbar like msn messenger
You can add in a FlashWindow API call to accomplish this. There maybe a .Net equivalent, but I'm not aware of one so far:
http://www.vbforums.com/showthread.p...ht=flashwindow
Re: make your program blink(orange) in taskbar like msn messenger
Updated after guesswork failed, this is a tried and tested version of the call in a .Net environment:
Code:
Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("user32.dll", EntryPoint:="FlashWindow")> _
Public Shared Function FlashWindow(ByVal hwnd As Integer, ByVal bInvert As Integer) As Integer
End Function
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
With Timer1
.Interval = 300
.Enabled = True
.Start()
End With
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
FlashWindow(Me.Handle, 1)
End Sub
End Class
Re: make your program blink(orange) in taskbar like msn messenger
Re: make your program blink(orange) in taskbar like msn messenger
Hmm i think dllimport is C#. Sorry, i suck with any other languages apart from vb.net, and even with vb.net, im not very good.
Re: make your program blink(orange) in taskbar like msn messenger
Hiya Zapper! Between posts I wrote a quick sample and changed the code above from a "try something like this which might work" to an actual tested solution coding example. :) DllImport isn't C# specific, but the original suggestion of the square brackets rather than the angle brackets was - apologies there!
Basically fire up a new VB Windows Application project. Add a timer control to the form, then use that code posted above and it'll work for you. :thumb: :)
Re: make your program blink(orange) in taskbar like msn messenger
Then if you need a beta tester, let me know! :D Not fantastic at chess at all but I play from time to time. ;) Good luck with your project!
Re: make your program blink(orange) in taskbar like msn messenger
lol haha yea! ty alot. almost finished with it, parts of the code may be tedious, but works!
just implied Enpassant, castle and promotion
Im almost finished my exams, only 2 easy ones left. but still kinda need to study for them.
Hope to verse u soon, =)
Re: make your program blink(orange) in taskbar like msn messenger
No problem. Just shout again if you can't get that one above working, or please mark the thread title with the word [Resolved] at the start of it if all's ok and working again. :wave: