My problem now is, I want the value of frmBlinker.lblMessage.Text &= Table.Rows.Count.ToString.Trim & " file(s) to receive."
should get displayed as a notification to a user time to time. The problem is when I give the value of frmBlinker.lblMessage.Text &= Table.Rows.Count.ToString.Trim & " file(s) to receive." to a timer control so that it checks whether
new files have been sent to the user, the form on which the total no. of files get disoplayed, freezees as a result of the timer control that keeps track of the records in the database if new record has been sent to the user. How do I please dispaly the result on the form while the timer is running and does not freeze the form, users do data entry on that form?
Thanks in advance.
Expand|Select|Wrap|Line Numbers
- Public Function TrackMovementOfFiles() As String
- strUsername = GetSetting("Lands", "Connection", "DataL1")
- strPassword = GetSetting("Lands", "Connection", "DataL2")
- strServerName = GetSetting("Lands", "Connection", "DataL3")
- strInitialCatalog = GetSetting("Lands", "Connection", "DataL4")
- DataL1 = strUsername & strPassword & "Connect Timeout=0; " & strServerName & strInitialCatalog
- Dim strQuery As String = "Select * from File_Movement where Movement_To='" & frmHome.txtUserName.Text.Trim & "' and Movement_Status='" & "Not Receipted" & "' and fdate > '2010-1-30' order by FDate desc, Ftime desc"
- SQLCon = New SqlConnection(DataL1)
- dTable = New DataSet
- daAdapter = New SqlDataAdapter(strQuery, SQLCon)
- daAdapter.Fill(dTable, "File_Movement")
- Dim Table As DataTable = dTable.Tables("File_Movement")
- If Table.Rows.Count > 0 Then
- frmBlinker.lblMessage.Text = ""
- frmBlinker.lblMessage.Text = "You have "
- frmBlinker.lblMessage.Text &= Table.Rows.Count.ToString.Trim & " file(s) to receive."
- Return Blinker.lblMessage.Text.ToString
- End If
- Return Nothing
- End Function