I am using Visual Studio 2012 (yea, I know it's old) and I'm trying to make a label blink during the loading of some words into a listview. This is what I have tried so far:
The Timer1_Tick event is never fired. Why? The interval is set to 1000 (blink once a second?)Code:Private Sub OPENToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles OPENToolStripMenuItem1.Click Dim loadinglist As Boolean = True Dim tmpInt1 As Integer = 0 Dim tmpInt2 As Integer = 0 Dim tmpString1 As String = Nothing ' Step 1: Set up the OpenFileDialog box: OpenFileDialog1.AddExtension = True OpenFileDialog1.CheckFileExists = True OpenFileDialog1.CheckPathExists = True OpenFileDialog1.DefaultExt = ".dat" OpenFileDialog1.FileName = Nothing OpenFileDialog1.Filter = "Dictionary Files (*.dat)|*.dat" OpenFileDialog1.InitialDirectory = My.Settings.DictPath OpenFileDialog1.Multiselect = False OpenFileDialog1.Title = "Select the DICTIONARY file you wish to edit:" ' Step 2: Get the DICTIONARY File name to open If OpenFileDialog1.ShowDialog = DialogResult.Cancel Then Exit Sub Timer1.Start() ' Step 3: Open the DICTIONARY file FileNum = FreeFile() FileOpen(FileNum, OpenFileDialog1.FileName, OpenMode.Random, OpenAccess.Read, OpenShare.LockRead) FileGet(FileNum, tmpInt2, 1) ' This is the number of words in the file FileGet(FileNum, tmpInt1, 2) ' This is the number of blocked words in the file ' Step 4: Loop to input all of the words & the wordblock indicators (checkboxes) For x As Integer = 3 To (tmpInt2 + 2) FileGet(FileNum, tmpString1, x) ListView1.Items.Add(Trim(Mid(tmpString1, 1, 15))) If Trim(Mid(tmpString1, 16, 1)) = "#" Then ListView1.Items.Item(x - 3).Checked = True Next ' Step 5: Close the file. FileClose(FileNum) Timer1.Stop() Label1.Hide() End Sub Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Label1.Visible = Not Label1.Visible End Sub
Can someone help me?




Reply With Quote
