codeorder 197 Nearly a Posting Virtuoso

Glad I could help.:)

I did realize something just now, Not late last night(actually early morning:D) when I previously posted.

Instead of adding and using the arContent() to add line.breaks to the html, it can all be done w/the .Replace.

If .Url.AbsoluteUri.StartsWith(urlMain) AndAlso .Url.AbsoluteUri.Length > urlMain.Length Then
                sMain = .Document.Body.InnerHtml  '// your html.source.
                If sMain.Contains("<PRE>") Then
                    iSi = sMain.IndexOf("<PRE>") + 5 '// locate your start.point.
                    iEi = sMain.IndexOf("</PRE>", iSi) '// locate end.point.
                    .DocumentText = "<div style=""font-family:Verdana;font-size:14px;""><hr />" & sMain.Substring(iSi, iEi - iSi).Replace(vbCrLf, "<br />") & "<hr /></div>" '// get results.
                End If
            End If
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private urlMain As String = "http://www.algebrahelp.com/calculators/equation/"
    Private sMain, arContent() As String, iSi, iEi As Integer

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate(urlMain)
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(sender As System.Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        With WebBrowser1
            TextBox2.Text = .Url.AbsoluteUri
            If .Url.AbsoluteUri = urlMain Then '// check if correct.url.
                With .Document
                    .GetElementById("equation").SetAttribute("value", TextBox1.Text)
                    .GetElementById("solvf").SetAttribute("value", ComboBox1.Text)
                    .GetElementById("equationForm").InvokeMember("submit")
                End With
            End If
            If .Url.AbsoluteUri.StartsWith(urlMain) AndAlso .Url.AbsoluteUri.Length > urlMain.Length Then
                sMain = .Document.Body.InnerHtml  '// your html.source.
                If sMain.Contains("<PRE>") Then
                    iSi = sMain.IndexOf("<PRE>") + 5 '// locate your start.point.
                    iEi = sMain.IndexOf("</PRE>", iSi) '// locate end.point.
                    arContent = sMain.Substring(iSi, iEi - iSi).Split(vbCrLf) '// .Split content to get lines.
                    sMain = ""
                    For Each itm As String In arContent '// loop thru all lines of content.
                        If Not sMain = "" Then sMain &= "<br />" & itm Else sMain = itm '// add "<br />" for the wb to recognize it as a new.line.
                    Next
                    .DocumentText = "<div style=""font-family:Verdana;font-size:14px;""><hr />" & sMain & "<hr /></div>" '// get results.
                End If
            End If
        End With
    End Sub
End Class

.btw, I cannot get the answer for "1+1" on that page:(; care to help me in Return and let me know the answer?since I've been trying to figure that out for years.
Thanks in advance.

codeorder 197 Nearly a Posting Virtuoso

Replace line.10 with this.

If arFileLines(i2).StartsWith(sToLookFOr) Then 
msgbox("this line is invalid: " & i2.tostring)
 Return False '// if not done w/the total of lines Then Return False.
End If

+= Glad I could help.:)

codeorder 197 Nearly a Posting Virtuoso

This should take care of the issue.

Private arFileLines(), sToLookFOr As String
    Private Function isFileValid(ByVal selCoolFile As String) As Boolean
        arFileLines = IO.File.ReadAllLines(selCoolFile) '// read file into array.
        sToLookFOr = "002"
        For i As Integer = 0 To arFileLines.Length - 1 '// loop thru all file lines, starting w/the second line.
            If arFileLines(i).StartsWith(sToLookFOr) Then '// check if current line startsWith your string to look for.
                '// get total of items"CInt(...)" following the line and loop thru the next lines until total.
                For i2 As Integer = i + 1 To i + CInt(arFileLines(i).Substring(12, 5))
                    If Not i2 > arFileLines.Length - 1 Then
                        If arFileLines(i2).StartsWith(sToLookFOr) Then Return False '// if not done w/the total of lines Then Return False.
                    Else
                        Return False '// if last line is missing.
                    End If
                Next
            End If
        Next
        Return True '// since it did not Return False, it can only be a valid File.
    End Function
renzlo commented: Very helpful man. +3
codeorder 197 Nearly a Posting Virtuoso

Use a Try/Catch for each itm and If you still get results, Then it is just that specific item that is not formatted properly.

For Each itm As ListViewItem In itms '// loop thru all itms in Array.
            Try
                With itm.SubItems(1).Text '// check Column2.Text
                    If CInt(.Substring(0, .IndexOf("/"))) = CInt(selCoolMonth) Then '// get all text prior to the first "/".
                        selCoolListView.Items.Add(itm) '// if a match, add to ListView.
                    End If
                End With
            Catch ex As Exception
                ' MsgBox(ex.Message)
            End Try
        Next
codeorder 197 Nearly a Posting Virtuoso

Check out this post.

codeorder 197 Nearly a Posting Virtuoso

It should not need an ID for it to click the submit button.
If it does not work, try changing the 1 to a 0, even a 2 If needed.

WebBrowser1.Document.Forms(0).InvokeMember("submit")
codeorder 197 Nearly a Posting Virtuoso

This should help with adding a value and clicking the submit button in a wb(WebBrowser).
http://www.daniweb.com/software-development/vbnet/threads/310090/1328780#post1328780

codeorder 197 Nearly a Posting Virtuoso

>>i can find no way to stop the increase. its impossible!
I can. Just don't use your .app.:D

codeorder 197 Nearly a Posting Virtuoso

Just overlooked the post you made and am wondering.

Do you want to check lines that start w/"002", get the total from end of line, and count "the following" lines until it validates against the total from end of line? Then go to next line w/"002" and validate again?

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        'MsgBox("File is valid = " & validateFile(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\test.txt"))'// FOR.TESTING.
        With New OpenFileDialog
            .Title = "select a cool file"
            .Filter = "Text File|*.txt"
            If .ShowDialog = Windows.Forms.DialogResult.OK Then '// check if ok.clicked.
                MsgBox("File is valid = " & validateFile(.FileName))
            End If
        End With
    End Sub

    Private arFileLines(), sToLookFOr, sTotal As String, iGoodLine, iBadLine As Integer
    Private Function validateFile(ByVal selCoolFile As String) As Boolean
        arFileLines = IO.File.ReadAllLines(selCoolFile) '// read file into array.
        With arFileLines(0) '// with first line.
            sToLookFOr = .Substring(0, 3) : sTotal = .Substring(12, 5) '// read line and set the values.
            iGoodLine = 1 : iBadLine = 0 '// reset counters; iGoodLine=1 Not 0, since it read the first line.
        End With
        For i As Integer = 1 To arFileLines.Length - 1 '// loop thru all file lines, starting w/the second line.
            With arFileLines(i)
                If Not .StartsWith(sToLookFOr) Then iBadLine += 1 Else iGoodLine += 1 '// add points as needed.
            End With
        Next
        'MsgBox(iGoodLine & "." & iBadLine)
        If CInt(sTotal) = iGoodLine Then Return True Else Return False '// validate total from line 1 against all found good lines and return as needed.
    End Function
End Class

...and thanks for the defined.details.:)

codeorder 197 Nearly a Posting Virtuoso

I'll try to help, though you have to provide some defined.details, one thing at a time.

codeorder 197 Nearly a Posting Virtuoso

I did not watch the video, though I thought I'd supply a "watch youtube video with vb.net" solution.
1.WebBrowser,1.Button

Public Class Form1

    Private iVidHeight As Integer = 500, iVidWidth As Integer = 800
    Private iVidStyleVersion As Integer = 3 '// changes vid.style. 

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        playCoolYouTubeVid("phYaduairf8", WebBrowser1) '// play video.
    End Sub
    Private Sub playCoolYouTubeVid(ByVal selCoolVid As String, ByVal selCoolWebBrowser As WebBrowser)
        Dim sObject As String = "<object style=""height:" & iVidHeight & "px; width:" & iVidWidth & "px""><param name=""movie"" value=""http://www.youtube.com/v/" & selCoolVid & "?version=" & iVidStyleVersion & "&feature=player_detailpage""><param name=""allowFullScreen"" value=""true""><param name=""allowScriptAccess"" value=""always""><embed src=""http://www.youtube.com/v/" & selCoolVid & "?version=" & iVidStyleVersion & "&feature=player_detailpage"" type=""application/x-shockwave-flash"" allowfullscreen=""true"" allowScriptAccess=""always"" height=""" & iVidHeight & "px"" width=""" & iVidWidth & "px""></object>"
        selCoolWebBrowser.DocumentText = sObject
    End Sub
End Class

To play the video, just copy the last part or any part of the url that contains the video.id.
.ex:
Vid.URL: http://www.youtube.com/watch?v=kg-z8JfOIKw
Vid.ID: kg-z8JfOIKw

codeorder 197 Nearly a Posting Virtuoso

If you just need to change the content of the WebBrowser with yours Then check out this post.

codeorder 197 Nearly a Posting Virtuoso

Add this to Form1_Load , just after you setCoolListViewItemsInArray(ListView1) .

ComboBox1.SelectedIndex = 1 '// select 2nd item in ComboBox.

This will trigger the _ComboBox1_SelectedIndexChanged and cause it to fire off the code within.

.btw, welcome to the forum AndAlso glad I could help.:)

codeorder 197 Nearly a Posting Virtuoso

"web.host provider" is someone as justhost.com, my web.host provider.

I did a quick google search and located this:

If you try to upload some file of more than 4 mb you will get and error. This is the default file size limit of dot net. This is defined in Machine.config. You can overwrite this in web.config. Like this...

http://www.eggheadcafe.com/community/asp-net/17/10297761/error-on-fileupload-contorl.aspx

For future references, If regarding ASP.NET, Then post on the ASP.NET forum.

Hope this helps.:)

codeorder 197 Nearly a Posting Virtuoso

Since already in my code.snippets, see if this helps.:)

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = getCoolHttp("http://www.daniweb.com/members/codeorder/811140")
    End Sub

    Private Function getCoolHttp(ByVal selCoolUrl As String) As String
        Me.Cursor = Cursors.WaitCursor
        Try
            Dim myResponse As Net.HttpWebResponse = Net.HttpWebRequest.Create(selCoolUrl).GetResponse '// connect.
            Dim myStream As IO.Stream = myResponse.GetResponseStream() '// get.
            Dim myReader As New IO.StreamReader(myStream) '// read.
            Dim webContent As String = myReader.ReadToEnd
            myReader.Close() : myStream.Close() : myResponse.Close()
            Me.Cursor = Cursors.Default
            Return webContent
        Catch ex As Exception
            Me.Cursor = Cursors.Default
            MsgBox("Connection Error.", MsgBoxStyle.Critical)
            Return Nothing
        End Try
    End Function
codeorder 197 Nearly a Posting Virtuoso

>>DateTimePicker1.Value = "01/JAN/" & DateTimePicker2.Value.Year
If you do not need to constantly change it to Jan.1st, see if this helps.

With DateTimePicker1
                .Value = New Date(DateTimePicker2.Value.Year, .Value.Month, .Value.Day)
            End With
GAiXz commented: satisfied? +1
codeorder 197 Nearly a Posting Virtuoso

>>Still is there anything that can make the text look smooth.
I've used .BackColor=Control and it returned unpleasant.
Changing the .BackColor to a very odd color, it worked fine here.
.other than this info, I am out of suggestions and glad that I could be of help so far.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private itms() As ListViewItem '// stores itms from ListView.

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        With ComboBox1.Items : For i As Integer = 1 To 12 : .Add(CStr(i)) : Next : End With '// load cmb(ComboBox).
        With ListView1.Items
            .Add(New ListViewItem("1,01/02/03".Split(",")))
            .Add(New ListViewItem("1,01/04/03".Split(",")))
            .Add(New ListViewItem("1,01/02/03".Split(",")))
            .Add(New ListViewItem("1,02/02/03".Split(",")))
            .Add(New ListViewItem("1,03/04/03".Split(",")))
            .Add(New ListViewItem("1,02/02/23".Split(",")))
        End With
        setCoolListViewItemsInArray(ListView1) '// IMPORTANT: after loading the ListView w/.Items, always set this.
    End Sub
    Private Sub setCoolListViewItemsInArray(ByVal selCoolListView As ListView)
        ReDim itms(selCoolListView.Items.Count - 1) '// reset the lenght of Array to lv.Items.Count
        For i As Integer = 0 To selCoolListView.Items.Count - 1
            itms(i) = selCoolListView.Items(i) '// set each array.itm as the appropriate lv.itm.
        Next
    End Sub

    Private Sub _ComboBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        With ComboBox1
            If Not .Text = "" Then filterCoolListView(ListView1, .Text)
        End With
    End Sub
    Private Sub filterCoolListView(ByVal selCoolListView As ListView, ByVal selCoolMonth As String)
        selCoolListView.Items.Clear() '// clear for new input.
        For Each itm As ListViewItem In itms '// loop thru all itms in Array.
            With itm.SubItems(1).Text '// check Column2.Text
                If CInt(.Substring(0, .IndexOf("/"))) = CInt(selCoolMonth) Then '// get all text prior to the first "/".
                    selCoolListView.Items.Add(itm) '// if a match, add to ListView.
                End If
            End With
        Next
    End Sub
End Class

I tried using ListView.ListViewItemCollection , though it kept clearing the Collection every time I cleared the ListView; very odd.

codeorder 197 Nearly a Posting Virtuoso

Could be that some servers do Not allow files to be uploaded If greater in size than 4MB. Check w/your web.host provider.

codeorder 197 Nearly a Posting Virtuoso

AnkitGuru is correct.
I would add a ProgressBar to your Form, have Me.Show() in your main.Form's load event just prior to running all neccesary code that makes your app.tick, and would add a value here and there to the ProgressBar throughout that code.
.ProgressBar just makes it more user friendly and notifies the user that sh.t is working, just loading up and not stalling.

codeorder 197 Nearly a Posting Virtuoso

Use a .Substring.

Private sMain As String, iSi, iEi As Integer
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        sMain = "abcd<pre>some calculation here</pre>efg" '// your html.source.
        iSi = sMain.IndexOf("<pre>") + 5 '// locate your start.point.
        iEi = sMain.IndexOf("</pre>", iSi) '// locate end.point.
        MsgBox(sMain.Substring(iSi, iEi - iSi)) '// get results.
    End Sub
codeorder 197 Nearly a Posting Virtuoso

If someone farts in your shoe and you wear that shoe, will your foot smell like poop?:-/

codeorder 197 Nearly a Posting Virtuoso

Endless possibilities will only leave someone stranded.

codeorder 197 Nearly a Posting Virtuoso

>>Any last tips...
:(

codeorder 197 Nearly a Posting Virtuoso

No memory.leak prior to the recently posted code?or the memory.leak was always there?
In any case, I provided what I know as a hobbyist vb.noob, good luck from here on out.:)

codeorder 197 Nearly a Posting Virtuoso
Form2.Show(Me)'// add "Me" to your code and hope it helps. xD

And you should be able to remove Me.TopMost = True from Form2_Load.

.btw, I would create a Sub for Form2.Size and use that as needed. Makes it easier to manage.:)

codeorder 197 Nearly a Posting Virtuoso

Should I let others know that I played w/myself today? Hmm...

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Private sInnerHtml As String
    Private Sub WebBrowser1_DocumentCompleted(sender As System.Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        sInnerHtml = WebBrowser1.Document.Body.InnerHtml
        With sInnerHtml.ToLower
            If .Contains("=""subject""") AndAlso .Contains("=""message""") AndAlso .Contains("=""btnSubmit""") Then
                '// run code here to post.
            End If
        End With
    End Sub

.might need a space here and there, though it should take care of the issue of Not using a Timer.

codeorder 197 Nearly a Posting Virtuoso

Add a "cool" Parameter to your Sub.

Sub two(byval selCoolTextBox as TextBox)

   'How to access TB here ?? or from anywhere in app domain
   msgbox(selCoolTextBox.text)
End Sub

And call it as:

private sub someBtn.Click
   two(TB)
End Sub
codeorder 197 Nearly a Posting Virtuoso

Thanks for input.
If thread solved, mark as Solved; best of luck and welcome to the forum.:)

codeorder 197 Nearly a Posting Virtuoso
With New SaveFileDialog
            .Filter = "Text Files (*.txt)|*.txt"
            .Title = "Save"
            If .ShowDialog = Windows.Forms.DialogResult.OK Then
                IO.File.WriteAllText(.FileName, TextBox1.Text)
                '// RichTextBox.
                'RichTextBox1.SaveFile(.FileName, RichTextBoxStreamType.RichText) '// change ".RichText" to ".PlainText" If needed.
            End If
        End With

If you still have this issue(should Not), reboot your system(could be an internal bug that needs to be squashed).

codeorder 197 Nearly a Posting Virtuoso
'// TextBox.
        IO.File.WriteAllText("full.path of file here", TextBox1.Text)
        '// RichTextBox.
        RichTextBox1.SaveFile("full.path of file here", RichTextBoxStreamType.RichText) '// change ".RichText" to ".PlainText" If needed.

Also, check if btnOk has been clicked before saving.

If SaveFile.ShowDialog = Windows.Forms.DialogResult.OK Then
            '// save :)
        End If
codeorder 197 Nearly a Posting Virtuoso

Dam.n your normal.standards man!:D
Enjoy them; for mine make my life easier to deal with and everyone else's life much better to be dealt with.:)

codeorder 197 Nearly a Posting Virtuoso

Here's a start.up w/2 Forms.

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Me.Opacity = 0.5
        Form2.Show(Me) '// keeps Form2 onTop of Form1.
    End Sub
Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Me.BackColor = Color.Azure '// set bg.color to some color you'll never use.
        Me.TransparencyKey = Me.BackColor '// turn Form.Clear.
        Me.Location = New Point(Form1.Location.X + 5, Form1.Location.Y + 15) '// set location.
    End Sub

When moving Form1 around, have it where it keeps the location of Form2 by using Form1_Move event, If needed.
.hope this helps.:)

codeorder 197 Nearly a Posting Virtuoso

Start a new.project, add your wmp(WindowsMediaPlayer) to Form, Then modify code w/this.

Try
            '// wmp.code here.
        Catch ex As Exception
            MsgBox(ex.Message) '// displays error.msg and does not crash app.  error.msg is not necessarly needed.
        End Try

If you get an error.msg, post the result.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Dim final1 As String = avail1 / total1 * 100
        Dim final2 As String = avail2 / total2 * 100
codeorder 197 Nearly a Posting Virtuoso

It will never be the same, If I continue to have the same issues.

codeorder 197 Nearly a Posting Virtuoso

Should I build and design the entire project also?:D

Here are some notes.
Add your 4 wb's and add 4 Timers.
Other than that, good luck.:)

codeorder 197 Nearly a Posting Virtuoso

As Phasma mentioned, a rtb(RichTextBox) would be the way to go; at least for a vb.noob.

See if this helps.
1.rtb, 1.btn(Button)

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.KeyPreview = True '// keep.Focus on Form while typing.
        RichTextBox1.ReadOnly = True '// disable typing.
    End Sub

    Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        With RichTextBox1
            For i As Integer = 0 To .Text.Length - 1 '// loop thru text.
                .Select(i, 1) '// select one letter at a time.
                If Not .SelectionColor = Color.Black Then '// check selected letter's color.
                    If .SelectedText.ToLower = e.KeyChar.ToString.ToLower Then '// check if letter pressed is the next letter to color.change.
                        .SelectionColor = Color.Black '// change letter's color.
                    End If
                    Exit For '// exit loop since done and possibly thank .Me later. :D
                End If
            Next
        End With
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        addWord("Visual")
    End Sub

    Private Sub addWord(ByVal selWord As String)
        With RichTextBox1
            .Clear()
            .Text = selWord '// add word.
            .ForeColor = Color.Red '// set color.
            .Select(0, 1) '// select 1st letter.
            .SelectionColor = Color.Black '// change letter's color.
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

File.Content:

img1.png|sound1.wav
img2.png|sound2.wav
img3.png|sound3.wav
Imports System.IO
Public Class Form1
    Public myMediaFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\TEMP\"
    Private myMediaListFile As String = myMediaFolder & "myMediaList.txt"
    Private arMedia() As String, iTemp As Integer, rnd As New Random, chrMain As String = "|"

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If File.Exists(myMediaListFile) Then arMedia = File.ReadAllLines(myMediaListFile) '// load file.
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not arMedia.Length = 0 Then
            iTemp = rnd.Next(0, arMedia.Length) '// get random #.
            With arMedia(iTemp)
                MsgBox(.Split(chrMain).GetValue(0) & vbNewLine & _
                       .Split(chrMain).GetValue(1))
            End With
        End If
    End Sub
End Class

Hope this helps.:)

codeorder 197 Nearly a Posting Virtuoso

How are these sins:D present in the TextBox?
1 sin per each line?:D
2 or more sins per line?:D
Or is it just a TextBox full of sins?:D with no hope of ever going to heaven.LMAOOO:D

codeorder 197 Nearly a Posting Virtuoso
codeorder 197 Nearly a Posting Virtuoso
Dim x As String = "http://sasqas.com/sadasd=sdasd"
        MsgBox(x.Substring(0, x.IndexOf("=") + 1)) '// 0=start.index, x.IndexOf...=Length
codeorder 197 Nearly a Posting Virtuoso

Since I cannot test it(no EA acct.), Not much at all I can do about it. Wish you luck and glad that I could be of help so far.:)

q.q.(quick.question)
Have you tested to see If it still has the memory leak?

.idea/suggestion.
Have you tried this w/multiple WebBrowsers?

codeorder 197 Nearly a Posting Virtuoso

.Replace the entire _WebBrowser1_DocumentCompleted event w/this.

Private Sub _WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        If isSendingPMSxD Then
            Application.DoEvents()
            tmrWb.Start()
        End If
    End Sub

    Private WithEvents tmrWb As New Timer With {.Interval = 500}
    Private Sub _tmrWb_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrWb.Tick
        Static iTimeOut As Integer = 0
        If Not iTimeOut = 3 Then '// roughly 1.5 sec.
            iTimeOut += 1
            Exit Sub
        Else
            iTimeOut = 0 '// reset timeOut.
            tmrWb.Stop() '// stop timer.
            With WebBrowser1.Document
                .GetElementById("subject").SetAttribute("value", TextBox3.Text)
                .GetElementById("message").SetAttribute("value", TextBox4.Text)
                .GetElementById("btnSubmit").InvokeMember("click")
            End With
            Label4.Text = iStartID
            If Not iStartID = iEndID Then
                iStartID += 1 : wbNavigate(iStartID) : Exit Sub
            Else
                isSendingPMSxD = False
                MsgBox(".done.")
                Button3.Enabled = True
            End If
        End If
    End Sub

I added a Timer to give it a TimeOut. Set the Timer's.Interval as needed, If needed.

quick.suggestion before .Replacing the event:
.Add "Application.DoEvents()" as the very first line of code in the wb.doc.completed event. Might or might Not Return results.
---
>>Cant check memory leak due to this fella.
If "this fella" is Waldo, I'll never get an answer, cause I can never find his butt anywhere.:D

codeorder 197 Nearly a Posting Virtuoso

Can you provide more details?
.btw, did it take care of the "memory increase leak"?

codeorder 197 Nearly a Posting Virtuoso

>>all i want is to random pictures and the sounds associated on that pictures will be played...
How do you plan to add the images and sounds to get recognized?
.From a File?.From My.Resources?.Full.Paths coded into your app.?

codeorder 197 Nearly a Posting Virtuoso

What exactly is the problem?
.No values in ProgressBars?