Does it run slow when not attached to the debugger (Debug > Start Without
Debugging) or when compiled into release mode?
I have this problem with the first exception thrown in an application when
attached to the debugger - the first exception takes about 5-10 seconds or
so to be caught, but any exceptions thrown after that run ok. This still
happens even if the exception is raised and caught somewhere in the
framework. If an internal exception is being raised in the Format function,
this could be the cause. Goto the Debug > Exceptions window and set all
exceptions to be caught by the debugger and you'll see if an exception is
being raised.
Even if one is being raised, there isn't anything you can do about it. Rest
easy in the fact that it should run ok in Release mode ;)
HTH,
Trev.
"Bob Graham" <rv*****@pacbell.net> wrote in message
news:a1******************@newssvr25.news.prodigy.c om...
This code:
txRate.Text = Format(payRate, "C")
(payRate is already succesfully set to a value such as 15D)
takes about 3-4 seconds to run the first time, after that it's plenty
fast.
What makes it slow on the first call?
Bob Graham