Results 1 to 7 of 7

Thread: [RESOLVED] How to stop my application in a loop.

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    City of Durian

    Resolved [RESOLVED] How to stop my application in a loop.

    Hello everyone... I have something to ask again.. I develop a program that will send bulk messages but the problem is that when I load at least 1000 emails then I want to stop the application I cannot stop it. Is there any way to stop this application without closing the form? So that i can save the file on my listview? Here is my code upon send bulk emails.

    Private Sub frmStatus_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
            Dim i As Integer
            Dim holder As String
            'Dim itemstring As String
            Dim LVITem As New ListViewItem
                    For i = 0 To ListView1.Items.Count - 1
                        holder = ListView1.Items(i).SubItems(1).Text
                        ListView1.Items(i).SubItems(2).Text = carrier
                        lblCount.Text = i + 1
                        lblLvwCount.Text = ListView1.Items.Count
                        SmoothProgressBar2.Value = (i + 1) * 100 / ListView1.Items.Count
                        Label1.Text = ((i + 1) * 100 / ListView1.Items.Count).ToString("N", nfi) + "%"
                    btnLog.Visible = True
                    btnStop.Enabled = True
            Catch ex As Exception
            End Try
        End Sub
    One problem I encountered also is that once the mail started to send and the user will click my listview my application will stop sending and I cannot stop the application anymore so if this happen I end up the application by using the stop in a task manager. Anyone can help me to this? Thanks in advance and have a nice day.
    Last edited by shyguyjeff; Jun 2nd, 2009 at 10:49 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width