VB 2008-为什么我的软件崩溃? [英] vb 2008 - why does my software crash?

查看:51
本文介绍了VB 2008-为什么我的软件崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在制作检查给定网站字符串的软件.我有两种形式,form1form2.
form1有一个名为checking_site
的进度条
在form1上,我有以下代码:



I am making a software which checks the string of a given website. I have two forms, form1 and form2.
form1 has a progress bar called checking_site

On form1 I have the following code:

If InStr(SourceC.Text, "flash") Or InStr(SourceC.Text, "<java>") Then
            form2.Show()
        ElseIf Checking_Site.Value = Checking_Site.Maximum Then
            Safe.Show()
        End If</java>


它检查"内和在form2上的两个单词,我有:


which checks for the two words inside " " and on form2 I have:

While form1.Checking_Site.Value < form1.Checking_Site.Maximum
            Me.Hide()
        End While


因此,在加载了form1上的进度条之前,form2应该保持隐藏状态,但是当我运行该软件并单击form1上的按钮以启动进度条时,该软件将崩溃.

有人知道原因吗?
预先感谢您的帮助.


so until the progress bar on form1 has loaded, form2 should remain hidden but when I run the software and click the button on form1 to start the progress bar, the software crashes.

Does anyone know the reason for this?
Thanks in advance to any help.

推荐答案

您的软件由于错误而崩溃. InStr是VB6的麻烦,您应该使用.NET方法,我无法在最后一刻对Microsoft在最后时刻导入到VB的垃圾进行评论.但是,我可能看到的崩溃是Checking_Site可以为null,form2可以为null或Safe可以为null.根据您发布的内容,无法说出这一点.
Your software crashes because of bugs. InStr is VB6 nastiness, you should use .NET methods, I can''t comment on the rubbish Microsoft imported to VB at the last minute in any depth. However, the possible crashes I can see, are if Checking_Site can be null, form2 can be null, or Safe can be null. Impossible to say, based on what you''ve posted.


这篇关于VB 2008-为什么我的软件崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆