微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何隐藏wizard.close的提示

如何解决如何隐藏wizard.close的提示

我想做什么:

如果用户在wpWelcome上单击“下一步”,并且在计算机上找到了旧版本的应用程序,那么我会提示一个msgBox

如果用户在msgBox上单击“取消”,那么我想中止安装并关闭向导而没有提示,就像使用TSetupStep的abort()一样,但是WizardForm.Close会提示一个msgBox确认取消。有什么办法可以抑制这种情况?

我下面的当前代码

function NextButtonClick(CurPage: Integer): Boolean;
begin
  if (CurPage=wpWelcome) then
  begin
    if (AppAlreadyInstalled()) then
    begin
      if MsgBox('Another installation of {#MyAppName} has been detected. 
         Proceeding with "OK" will uninstall the existing program first. 
         Press "cancel" to abort and exit installer.',mbConfirmation,MB_OKCANCEL or MB_DEFBUTTON2) = IDOK  then
      begin
        UnInstallOldVersion();
        Result:= True;
      end
      else
      begin
        Result:= False; 
        WizardForm.Close;
      end;
    end; 
  end;
end;

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。