By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,180 Members | 1,051 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,180 IT Pros & Developers. It's quick & easy.

vb.net system tray app - slow response time when viewing form

P: n/a
dk
Any idea why the response time is slow when running
a system tray app when viewing the properties form?
There is one primary loop and a timer control which
executes every 3minutes. Is having the Primary loop the
problem?

tia,
dk
'Primary loop
Do While Me.mbRunning
With Me.tryIcon
If RTrim(strstatus$) = "" Then strstatus$
= "The first refresh interval is cycling, please stand by"
.Text = strstatus$
.ContextMenu = Me.mnuOptions
End With
Dim temppathstring As String = AppPath()
Dim tempconfigfile As New configfile
(temppathstring + "\triggerwatch.config")
System.Threading.Thread.Sleep
(tempconfigfile.GetAppSetting("spinratekey") * 100)
Application.DoEvents()
If tempconfigfile.GetAppSetting
("animateiconkey") = "true" Then
Me.AnimateIcon()
Else
Me.DoNotAnimateIcon()
End If
temppathstring = Nothing
tempconfigfile = Nothing
Loop
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Tue, 21 Oct 2003 06:55:50 -0700, dk wrote:
Any idea why the response time is slow when running
a system tray app when viewing the properties form?
There is one primary loop and a timer control which
executes every 3minutes. Is having the Primary loop the
problem?

tia,
dk
'Primary loop
Do While Me.mbRunning
With Me.tryIcon
If RTrim(strstatus$) = "" Then strstatus$
= "The first refresh interval is cycling, please stand by"
.Text = strstatus$
.ContextMenu = Me.mnuOptions
End With
Dim temppathstring As String = AppPath()
Dim tempconfigfile As New configfile
(temppathstring + "\triggerwatch.config")
System.Threading.Thread.Sleep
(tempconfigfile.GetAppSetting("spinratekey") * 100)
Application.DoEvents()
If tempconfigfile.GetAppSetting
("animateiconkey") = "true" Then
Me.AnimateIcon()
Else
Me.DoNotAnimateIcon()
End If
temppathstring = Nothing
tempconfigfile = Nothing
Loop


I'm not sure what the purpose of the loop is. Is it to cause the tray icon
to be animated? That could easily be accomplished with a timer, and
probably more efficiently as well. A tight loop can certainly cause slow
response time, but without knowing more about your application, it's
difficult to tell.

What is "Me"? Does that refer a form? A component?

I think some more information about the structure of your app would be
helpful.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.