德尔福的输入框是模态的吗?即它应该等待输入吗?



这是Windows 10中的错误还是仅仅是卡住的键?

在我的Delphi 2009应用程序中,我通过放置在while循环中的简单输入框来请求用户名,以便他们不能将其留空。如果他们取消或单击"确定"而不输入名称,则会显示验证消息,并且循环将循环并再次询问。

我的一个用户(使用 windows 10,但我不知道是哪个版本(到了这个点,应用程序挂在这个循环中。他们将屏幕描述为"闪烁",屏幕截图在屏幕上显示输入框和验证消息,但几乎是透明的,表明它们都显示得非常快。我的应用程序保留的日志也显示它到达循环之前的位置,但没有进一步。此用户可以在不同日期重现此操作。

以防万一,我在这里和这里检查了这些SO帖子,但我的这段代码太基本了,我看不到会发生什么。

有问题的代码是

function TFrmProcessIPaddressRemoteAccess_JHM.CheckAndProcessUserIPaddress( TheIPaddress: string): boolean;
const
EMPTY_STRING = '';
var 
comment : string;
begin
<stuff to do with checking if IP address is already on server>
comment := EMPTY_STRING;
while comment = EMPTY_STRING do
begin
comment := inputbox('Adding IP address', 
'Your IP address is not in the list of those allowed access. ' + slinebreak
+'MAMbase is about to add it.' + slinebreak + slinebreak
+'Please enter your name so that the IP address can be identified', EMPTY_STRING);
if comment = EMPTY_STRING then
showmessage('Please enter your name');
end;
<stuff to do with adding the IP address and the comment to the server>
end;

德尔福的InputBox是模态吗?

是的。

最新更新