Hi Guys
Is it possible to have code running in the background and still be able to use other parts of the program (i.e. firing other events).
For example I have a instant messaging chat in my program and when the user has a new message then the display flashes from green to red as seen below
But I still want to be able to continue using the other functions in my program despite having this code running in the background (which highlights to the user that he has a new instant message by changing the display background colour)Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Red System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Green System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Red System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Green System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Red System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Green System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Red System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Green System.Threading.Thread.Sleep(500) Me.dockMessages.PredefinedTabColor = DevComponents.DotNetBar.eTabItemColor.Red End Sub
How can I overcome this?
Thanks




Reply With Quote