Microsoft KB Archive/305045

= PRB: MessageBox or InputBox with Timeout Under One Millisecond Never Times Out =

Article ID: 305045

Article Last Modified on 8/31/2001

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q305045



SYMPTOMS
A MessageBox or InputBox function with a timeout parameter less than one millisecond may never time out.



CAUSE
Because both functions use milliseconds as their timeout parameter, any number that is less than one is treated as a zero. For example, using 0.5 as the timeout parameter causes InputBox or MessageBox to display indefinitely because the value is treated as a zero.



RESOLUTION
Use a timeout parameter that is greater than or equal to one.



STATUS
This behavior is by design.



MORE INFORMATION
To reproduce the behavior, type either of these lines in the Command window: =INPUTBOX(&quot;Hello world&quot;,&quot;Hey there! &quot;,&quot;&quot;,0.5) =MESSAGEBOX(&quot;Hello world&quot;, 0, &quot;&quot;, 0.5) Note that neither window times out; both windows remain on the screen indefinitely.

Keywords: kbcodesnippet kbprb KB305045

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.