Threads

  • Thread starter Thread starter Bharathi kumar
  • Start date Start date
B

Bharathi kumar

Hi,

I have 4 threads running in my windows application. (No. of
threads may increase also)

My application is an Inventory Management appln.

Customers will place orders, Trade center will serve customer orders,
Warehouses inturn serve Trade centers orders etc.

Customer activities will be running in one thread, Trade center
activities will be running in another thread and Warehouses activities
will be running in another thread.

I have one master thread also that displays the status.

I created user controls for each one (Customer, Retailer, warehouse).
User control displays one image and the inventory values associated
with the entity.

My problem here is while the threads are performing their operation, if
user places mouse on any entity, I should show his current staus in a
tool tip (like baloon help).

In the User control, for mouse over event I added the tool tip code.
But its not showing the tool tip always. When I keep mouse on it for
sometime, sometimes its showing and sometimes its not showing.
Sometimes the tool tip shows immediately when the mouse enters the user
control.

Any ideas please..........

Thanks in advance,
Barti Kumar.
 
Hi,
Please find the code. RMInvCtrl1 is a user control.

Private Sub RMInvCtrl1_MouseEnter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles RMInvCtrl1.MouseEnter
If Not RMInvCtrl1.Inventory Is Nothing Then
ToolTip1.Show(GetToolTipForInvCtrl(RMInvCtrl1.Inventory),
Me, 5000)
End If
End Sub


GetToolTipForInvCtrl is a function that returns the current status,

Regards,
Bharti.
 
Bharathi said:
Hi,

I have 4 threads running in my windows application. (No. of
threads may increase also)

My application is an Inventory Management appln.

Customers will place orders, Trade center will serve customer orders,
Warehouses inturn serve Trade centers orders etc.

Customer activities will be running in one thread, Trade center
activities will be running in another thread and Warehouses activities
will be running in another thread.

I have one master thread also that displays the status.

I created user controls for each one (Customer, Retailer, warehouse).
User control displays one image and the inventory values associated
with the entity.

My problem here is while the threads are performing their operation, if
user places mouse on any entity, I should show his current staus in a
tool tip (like baloon help).

This sounds as if you are sometimes using the UI thread to perform the
work operations. Obviously, if the UI thread is busy, it can't fire the
events that your code listens for to display tooltips etc. To keep all
your UI elements responsive, you need to make sure the UI thread is
never busy.
 
Thank you.


Larry said:
This sounds as if you are sometimes using the UI thread to perform the
work operations. Obviously, if the UI thread is busy, it can't fire the
events that your code listens for to display tooltips etc. To keep all
your UI elements responsive, you need to make sure the UI thread is
never busy.



--
Larry Lard
(e-mail address removed)
The address is real, but unread - please reply to the group
For VB and C# questions - tell us which version
 
Back
Top