Colleagues,
Subject line says it (again!) Here's thew code of the Main proc.:
I run it in Debug (F5). The Form flashes and disappears.
I put a break point in the Load proc (at the End Sub statement):
At that break point the form appeared, but both controls (txtSrcDir and lstExtensions) were blank (they shouldn't be), and that "blue circle" kept turning, and turning, and turning... until I went Debug/Stop Debugging to "kill" it.
What am I doing wrong?
Please advise.
Regards,
Ilya
Subject line says it (again!) Here's thew code of the Main proc.:
Code:
Module ASCII_Text_Search_Main
Public glDevelop As Boolean = System.Diagnostics.Debugger.IsAttached
Public gsStartDir As String = (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)).Replace("\bin\Debug", "\")
Public Dim gaFileTypes() As String = New String() {}
'====================================================================================================================================
Public Sub Main()
'====================================================================================================================================
FillExtArray()
frmASCII_Text_Search.Show()
End Sub
'====================================================================================================================================
I put a break point in the Load proc (at the End Sub statement):
Code:
Public Class frmASCII_Text_Search
Private Sub cmdExit_Click(sender As Object, e As EventArgs) Handles cmdExit.Click
Me.Close()
End
End Sub
'====================================================================================================================================
Private Sub frmASCII_Text_Search_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'====================================================================================================================================
' Purpose : Initializes Form and its components.
' Description : Initializes Search in Dir entry box with Program's Start Dir;
' Fills out the File Types ListBox;
' Side effects : Shan't be any.
' Notes : 1. Application-specific.
' 2. Complies with .NET Framework ver. 1.1 and higher.
' Author : Ilya I. Rabyy
' Revisions : by Ilya on 2022-01-25 – started 1st draft.
'====================================================================================================================================
txtSrcDir.Text = gsStartDir
chkSrcSubDirs.Checked = False
Dim lnExtCnt As Int16 = gaFileTypes.Length() - 1
For iPtr As Int16 = 0 To lnExtCnt
Me.lstExtensions.Items.Add(gaFileTypes(iPtr))
Next
End Sub 'break point here
End Class
What am I doing wrong?
Please advise.
Regards,
Ilya