标题:求助:请问各位老师,表单在运行时如图
取消只看楼主
强国学习
Rank: 2
等 级:论坛游民
帖 子:58
专家分:19
注 册:2020-4-1
结帖率:66.67%
已结贴  问题点数:20 回复次数:1 
求助:请问各位老师,表单在运行时如图
问题红1:怎样做才能把每一步的检测结果显示出来,即动态的,代码现在写在表单的激活项
问题红2:怎样设计这个combo,让它可以在运行过程中可以选择,如果没选择,检测完后在规定时间自动跳到一个表单?
搜索更多相关主题的帖子: 运行 检测 表单 选择 老师 
2022-04-29 11:12
强国学习
Rank: 2
等 级:论坛游民
帖 子:58
专家分:19
注 册:2020-4-1
得分:0 
form1的activate
thisform.text1.value="正在检测网络,请等待..."
   owsh=createobject("wscript.shell")
   owsh.run (" /c ping -n 1 -r 9 192.168.1.65>D:\jyfw\ip.txt",0,.t.)
   IF FILE('D:\jyfw\ip.txt')
      IF AT('来自 192.168.1.65 的回复',FILETOSTR('D:\jyfw\ip.txt'))>10
         DELETE FILE D:\jyfw\ip.txt
         thisform.text1.value="正在检测服务器联通性,请等待..."
         THISFORM.REFRESH
         if not directory('Z:\')
            thisform.text1.value="正在连接服务器,请等待..."
            THISFORM.REFRESH
            run/n net use Z: \\192.168.1.65\data shared
            
            if thisform.serverconnecttest()=1
               =MESSAGEBOX('连接服务器失败,请联系系统管理员。错误代码3','信息提示')
               thisform.release
            else
               thisform.text1.value="正在检查主要数据文件的完整性,请等待..."
               THISFORM.REFRESH
               if databasecomplete()=0
                  thisform.userdatebasecheck()
                  thisform.text1.value="检测完成,正在登录"
                  
                  
                  *THISFORM.REFRESH
                  *do form dlbd
                  *thisform.release
               else
                  e='重要数据文件丢失,请联系系统管理员。代码:'+alltrim(str(thisform.databasecomplete()))
                  =MESSAGEBOX(e,'信息提示')
                  thisform.release
               endi
            endi
           
         else
            if thisform.serverconnecttest()=1
               =MESSAGEBOX('连接服务器失败,请联系系统管理员。错误代码3','信息提示')
               thisform.release
            else
               thisform.text1.value="正在检查主要数据文件的完整性,请等待..."
               THISFORM.REFRESH
               if thisform.databasecomplete()=0
                  thisform.userdatebasecheck()
                  thisform.text1.value="检测完成,正在登录"
                  
                  
                  *THISFORM.REFRESH
                  *do form dlbd
                  *thisform.release
               else
                  e='重要数据文件丢失,请联系系统管理员。代码:'+alltrim(str(thisform.databasecomplete()))
                  =MESSAGEBOX(e,'信息提示')
                  thisform.release
               endi
            endi
         endif
      else
         DELETE FILE D:\jyfw\ip.txt
         =MESSAGEBOX('网络连接失败,请检查网络或联系网络管理员。错误代码1','信息提示')
         thisform.release
      endi
   else
      =MESSAGEBOX('检测网络失败,操作系统异常,请联系系统管理员。错误代码2','信息提示')
      thisform.release
   endi
2022-04-29 12:11



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-508975-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.039239 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved