codeorder 197 Nearly a Posting Virtuoso

.see if this helps.

Imports System.IO
Public Class Form1
    Private myFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\test.txt"
    Private arFileLines() As String = Nothing

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        myCoolSub()
    End Sub
    Private Sub myCoolSub()
        If File.Exists(myFile) Then
            arFileLines = File.ReadAllLines(myFile)
            For i As Integer = 0 To arFileLines.Length - 1 Step +2 '// loop thru file.lines and skip reading every other line.
                MsgBox(arFileLines(i) & vbNewLine & arFileLines(i + 1))
            Next
        End If
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private arCmbItems() As String = {"full", "installment"} '// ComboBox.Items.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With ComboBox1.Items
            .Add(arCmbItems(0)) : .Add(arCmbItems(1)) '// add .Items.
        End With
    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        With ComboBox1
            If Not .SelectedIndex = -1 Then
                Select Case .SelectedItem '// compare.Item w/String Array.
                    Case arCmbItems(0)
                        MsgBox("item 1") '// send selected.Data to other Form's ListView here.
                    Case arCmbItems(1)
                        MsgBox("item 2") '// send selected.Data to other Form's ListView here.
                End Select
            End If
        End With
    End Sub
End Class
Reverend Jim commented: I cannot believe that you were actually able to parse that request. +7
codeorder 197 Nearly a Posting Virtuoso

First off, the code below is not functional as needed and it will throw an Exception.

Imports System.IO
Public Class Form1
    Public myFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\"
    Private myScoreFile As String = myFolder & "scoreFile.txt", myGameDatesFile As String = myFolder & "gameDatesFile.txt"
    Private arMain(), sDateFormat As String, iMyCurrentGameDay As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            test()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

    Private Sub test()
        If File.Exists(myScoreFile) Then
            arMain = File.ReadAllLines(myScoreFile) '// read.File.
            If Not arMain.Length = 0 Then '// if .File has content.
                With arMain(0).ToString '// With line1.
                    If .Contains(",") Then
                        iMyCurrentGameDay = .Split(","c).Length - 1 '// get Total games played, from scoreFile.txt.
                    End If
                End With
                If File.Exists(myGameDatesFile) Then
                    arMain = File.ReadAllLines(myGameDatesFile) '// read.File.
                    sDateFormat = "dd/mm/yyyy"
                    For i As Integer = 0 To arMain.Length - 1
                        With arMain(i)
                            If CDate(Format(.ToString, sDateFormat)) > CDate(Format(Now, sDateFormat)) Then
                                ' MsgBox(.ToString)
                            End If
                        End With
                    Next
                End If
            End If
        End If
    End Sub
End Class

I tried to wrap my head around your issue for the past hour+ and with other projects in mind, I have to leave it as is, beta.code.
I hope IT.might help to figure out how to get the Total.games played and compare them to the gameDates, or at least give you another suggestion that might eventually lead to a solution.

The scoreFile, I edited to only contain 3games and I even created a separate gameDatesFile. Since I'm a hobbyist …

codeorder 197 Nearly a Posting Virtuoso

To add images or any file/files to My.Resources, follow these little steps.

First, check out the 3attached.images, in the order they appear.
2nd, you're done.:)

With PictureBox1
            .Image = My.Resources.jessica_alba
        End With

3rd, Jessica Alba is a hottie.:*

y2kshane commented: thnx +2
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Private sTemp As String = Nothing '// TEMP String.
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        sTemp = "" '// clear for new input.
        For Each myCoolTextBox In New TextBox() {TextBox1, TextBox2, TextBox3} '// your TextBoxes.
            sTemp &= myCoolTextBox.Text '// add to Strings using "&" and add.#'s up using "+", less confusing. :)
        Next
        MsgBox(sTemp) '// result.
    End Sub

AndAlso :

Private sTemp As String = Nothing, iCoolNumberOfBoxes As Integer = Nothing
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        iCoolNumberOfBoxes = 3 '// set as needed.
        sTemp = "" '// clear for new input.
        For i As Integer = 1 To iCoolNumberOfBoxes
            sTemp &= CType(Me.Controls("TextBox" & i.ToString), TextBox).Text
        Next
        MsgBox(sTemp) '// result.
    End Sub
codeorder 197 Nearly a Posting Virtuoso

>>thanks you for read this topic!
Anything else we can do to waste our time and get no.input back on the input we posted?

codeorder 197 Nearly a Posting Virtuoso

Not case-sensitive? WTF? You gonna pay extra for that or are you just asking for a freebie? :D

See if this helps.:)

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        With ListBox1
            .SelectedIndex = -1 '// -1 Index ='s No.Item.Selected.
            If Not TextBox1.Text = "" Then
                For Each itm As String In .Items '// loop thru items.
                    If itm.ToLower = TextBox1.Text.ToLower Then '// Case inSensitive search.
                        .SelectedItem = itm '// select item.
                        Exit For '// exit loop since item located. 
                    End If
                Next
                Exit Sub '// just.because the next 2 lines are not worth reading. :)
            End If
        End With
    End Sub
Riteman commented: Thanks! +1
codeorder 197 Nearly a Posting Virtuoso

Updated code from your other thread.
1 Button, 1 ProgressBar

Imports System.IO
Public Class Form1
    Private sTemp1, sTemp2 As String '// TEMP.Strings, used as needed.

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim fbd As New FolderBrowserDialog : sTemp1 = "" : sTemp2 = ""
        With fbd
            .Description = "Select a folder to copy the content FROM..." '// Source.Folder
            If .ShowDialog = Windows.Forms.DialogResult.OK Then sTemp1 = .SelectedPath
            .Description = "Select a folder to copy the content TO..." '// Destination.Folder
            If .ShowDialog = Windows.Forms.DialogResult.OK Then sTemp2 = .SelectedPath
            If Not sTemp1 = "" OrElse Not sTemp2 = "" Then copyDirectory(sTemp1, sTemp2, , ProgressBar1)
        End With
    End Sub

    Private Sub copyDirectory(ByVal selCoolSourcePath As String, ByVal selDestinationPath As String, Optional selCoolFileExtension As String = "*.*", Optional selCoolProgressBar As ProgressBar = Nothing)
        sTemp1 = ""
        With selCoolProgressBar
            If Not selCoolProgressBar Is Nothing Then '// if ProgressBar sent, set .Value and .Maximum.
                .Value = 0
                .Maximum = Directory.GetFiles(selCoolSourcePath, selCoolFileExtension, IO.SearchOption.AllDirectories).Length
            End If
            If Not Directory.Exists(selDestinationPath) Then Directory.CreateDirectory(selDestinationPath) '// create Folder if needed.
            For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
                                                     (selCoolSourcePath, FileIO.SearchOption.SearchAllSubDirectories, selCoolFileExtension) '// loop thru Source.Files.
                sTemp1 = selDestinationPath & "\" & Path.GetFileName(myCoolFile) '// set .DestinationPath w/only the filename+extension.
                If Not File.Exists(sTemp1) Then '// if .File Not.Exist, procced, Else it will error "for.now".
                    File.Copy(myCoolFile, sTemp1) '// copy File.over.
                Else
                    ' MsgBox("File.Exists in Destination.Folder, cannot copy." & vbNewLine & sTemp1, MsgBoxStyle.Information)
                End If
                If Not selCoolProgressBar Is Nothing Then .Value += 1 '// +=1 .Value, if ProgressBar sent.
            Next …
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 Button

Public Class Form1
    Private sTemp1, sTemp2 As String

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        sTemp1 = "" : sTemp2 = ""
        Dim fbd As New FolderBrowserDialog
        With fbd
            .Description = "Select a folder to copy the content FROM..."
            If .ShowDialog = Windows.Forms.DialogResult.OK Then
                sTemp1 = .SelectedPath
            End If
            .Description = "Select a folder to copy the content TO..."
            If .ShowDialog = Windows.Forms.DialogResult.OK Then
                sTemp2 = .SelectedPath
            End If
            If Not sTemp1 = "" OrElse Not sTemp2 = "" Then copyDirectory(sTemp1, sTemp2)
        End With
    End Sub

    Private Sub copyDirectory(ByVal selTargetPath As String, ByVal selDestinationPath As String)
        sTemp1 = ""
        If Not IO.Directory.Exists(selDestinationPath) Then IO.Directory.CreateDirectory(selDestinationPath)
        For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
                                                 (selTargetPath, FileIO.SearchOption.SearchTopLevelOnly, "*.*")
            sTemp1 = selDestinationPath & "\" & IO.Path.GetFileName(myCoolFile)
            If Not IO.File.Exists(sTemp1) Then
                IO.File.Copy(myCoolFile, sTemp1)
            Else
                MsgBox("File.Exists, cannot copy." & vbNewLine & sTemp1, MsgBoxStyle.Information)
            End If
        Next
        MsgBox(".done.", MsgBoxStyle.Information)
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps for starters.
New Project(2 Buttons, 1 Label, 4 RadioButtons)

Public Class Form1

#Region "===----===----===----===----- DECLARATIONS  -----===----===----===----==="
    Public myCoolQuestionsAndAnswersFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\QandA.txt" '// your File.
    Private arlQandA As New ArrayList '// store all File.Lines in.
    Private iSelectedQuestion, iCorrectAnswer As Integer '// set the CurrentQuestion and the CorrectAnswer indexes.
    Private arT() As String '// TEMP String Array; .Splits the File.Line to get values.
#End Region

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        '// load File.
        If IO.File.Exists(myCoolQuestionsAndAnswersFile) Then
            arlQandA.AddRange(IO.File.ReadAllLines(myCoolQuestionsAndAnswersFile))
            setCoolQuestionAndAnswers(iSelectedQuestion)
        Else
            Button1.Enabled = False : Button2.Enabled = False
        End If
        Button1.Text = ".>Next Q." '// next Question.
        Button2.Text = ".check A." '// check Answer.
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        getNextCoolQuestionAndAnswers(iSelectedQuestion)
    End Sub '// next Question.

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        verifySelectedCoolAnswer()
    End Sub '// check Answer.

#Region "===----===----===----===----- QandA ZONE  -----===----===----===----==="

    Private Sub getNextCoolQuestionAndAnswers(ByVal selQuestionIndex As Integer)
        If Not arlQandA.Count - 1 = selQuestionIndex Then '// check if Not the selectedQuestion is the last Question in the ArrayList.
            selQuestionIndex += 1 '// set the QuestionIndex.
            setCoolQuestionAndAnswers(selQuestionIndex) '// set the Question.
        End If
    End Sub

    Private Sub setCoolQuestionAndAnswers(ByVal selQuestionIndex As Integer)
        arT = arlQandA(selQuestionIndex).ToString.Split(">") '// .Split current File line into Arrays.
        Label1.Text = arT(0) '// set first value.
        RadioButton1.Text = arT(1) '// set second value.
        RadioButton2.Text = arT(2) '// etc..
        RadioButton3.Text = arT(3)
        RadioButton4.Text = arT(4)
        iCorrectAnswer = CInt(arT(5))
    End Sub

    Private Sub verifySelectedCoolAnswer()
        For Each rb In New RadioButton() …
codeorder 197 Nearly a Posting Virtuoso

Hope this might provide some light on the matter as well.

debasisdas commented: the link neatly explains. +13
codeorder 197 Nearly a Posting Virtuoso

>>e.g Start with a capital.

With TextBox1
            .Text = StrConv(.Text, VbStrConv.ProperCase)
        End With
codeorder 197 Nearly a Posting Virtuoso

Also, check out this thread in case you just need the FileNames, not FullPaths to display in ListBox.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Private Sub loadFile(ByVal myCoolSelectedFile As String)
        If IO.File.Exists(myCoolSelectedFile) Then
            Process.Start(myCoolSelectedFile)
        Else
            MsgBox("This file does not exist.")
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        loadFile("C:\someFile.someExtension")
    End Sub
sujimon commented: this helped me in my project !! +1
codeorder 197 Nearly a Posting Virtuoso

I just finished putting this together. Hope it helps.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        replaceText(TextBox1)
    End Sub

    Private Sub replaceText(ByVal myCoolTextBoxToReplaceIn As TextBox)
        Dim iSi As Integer, sTemp As String
        With myCoolTextBoxToReplaceIn
            Do Until iSi >= .TextLength
                If .Text.Substring(iSi).Contains("|") Then
                    iSi = .Text.IndexOf("|", iSi)
                    sTemp = .Text.Substring(iSi - 3, 7)
                    .Text = .Text.Replace(sTemp, "***|***")
                    MsgBox(sTemp) '// get value.
                End If
                iSi += 1
            Loop
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 Button, 1 ListBox

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        getHTML("http://hidemyass.com/proxy-list/")
    End Sub

    Private myWebResponse As Net.HttpWebResponse
    Private myStream As IO.Stream
    Private myReader As IO.StreamReader

    Private Sub getHTML(ByVal siteURL As String)
        Me.Cursor = Cursors.WaitCursor
        Try
            myWebResponse = CType(Net.HttpWebRequest.Create(siteURL).GetResponse, Net.HttpWebResponse)
            myStream = myWebResponse.GetResponseStream()
            myReader = New IO.StreamReader(myStream)
            extractHTML(myReader.ReadToEnd, ListBox1)
            myReader.Close()
            myStream.Close()
            myWebResponse.Close()
        Catch ex As Exception
            MsgBox("There was a connection problem.", MsgBoxStyle.Critical)
        End Try
        Me.Cursor = Cursors.Default
    End Sub

    Private iSi, iEi As Integer, arTemp(), sTemp, sItemToAddToListBox As String

    Private Sub extractHTML(ByVal htmlContent As String, ByVal selListbox As ListBox)
        selListbox.Items.Clear()
        With htmlContent
            iSi = .IndexOf("<td>IP address</td>")
            iEi = .IndexOf("</table>", iSi)
            arTemp = .Substring(iSi, iEi - iSi).Split("/"c)
        End With
        sTemp = "<td><span>"
        For i As Integer = 0 To arTemp.Length - 1
            With arTemp(i)
                If .ToLower.Contains(sTemp) Then
                    sItemToAddToListBox = .Substring(.IndexOf(sTemp) + sTemp.Length).Replace("<", "")
                    sItemToAddToListBox &= ":" & arTemp(i + 2).Substring(.IndexOf("<td>") + 5).Replace("<", "")
                    selListbox.Items.Add(sItemToAddToListBox)
                End If
            End With
        Next
        MsgBox("done")
    End Sub
End Class
Alleyn commented: Amazingly Helpful +0
codeorder 197 Nearly a Posting Virtuoso

"DUDE!!!", what's the hurry, we're not getting paid here. :D

See if this helps.

If Not CType(Me.Controls(TextBox1.Text), LinkLabel) Is Nothing Then
            With CType(Me.Controls(TextBox1.Text), LinkLabel)
                .BackColor = Color.Orange
            End With
        End If

Nice app. btw.:)

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '// when adding new row of controls, add a Handler for your PictureBoxRemove.
        AddHandler PictureBoxRemove1.Click, AddressOf PictureBoxRemove_Click
        'AddHandler PictureBoxRemove2.Click, AddressOf PictureBoxRemove_Click
        'AddHandler PictureBoxRemove3.Click, AddressOf PictureBoxRemove_Click
    End Sub

    Private Sub PictureBoxRemove_Click(sender As System.Object, e As System.EventArgs)
        '// get name of sender and remove the name except for the end #.
        Dim sNumber As String = CType(sender, PictureBox).Name.Replace("PictureBoxRemove", "")
        With Panel1 '// your Panel.
            '// since you now have the # for the row, delete all controls that end w/that #.
            .Controls.Remove(CType(.Controls("PictureBoxAdd" & sNumber), PictureBox))
            .Controls.Remove(CType(.Controls("PictureBoxRemove" & sNumber), PictureBox))
            .Controls.Remove(CType(.Controls("TextBox" & sNumber), TextBox))
            .Controls.Remove(CType(.Controls("Button" & sNumber), Button))
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Seems that line 13 is causing the error since it probably is an Array and you need to have an index for which Array to get the value from, not the entire Array.

Try this:

MsgBox(movieArray(a))
Jake.20 commented: Great help. +3
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private arLetterChars() As Char = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 "
    Private arEncryptedChars() As Char = "¿s¢çc‹i˜Ö´åÄÚKÍìæ¯~4Ûÿ5ÑûÏÉí³èô§ŠÀÙ9ÒÓ?þ.äƒ%*𾆱HI2@æŒ,"

    '// encrypt.
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With TextBox1
            For Each myTextBoxChar As Char In .Text '// loop thru TextBox, one char. at a time.
                For i As Integer = 0 To arLetterChars.Length - 1 '// loop thru all letters in the Array.
                    '// if TextBox char ='s the char in your Array, replace the TextBox char with the same #'ed Array char of the Encrypted letters.
                    If myTextBoxChar = arLetterChars(i) Then .Text = .Text.Replace(myTextBoxChar, arEncryptedChars(i))
                Next
            Next
        End With
    End Sub
    '// decrypt.
    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        With TextBox1
            For Each myTextBoxChar As Char In .Text '// loop thru TextBox, one char. at a time.
                For i As Integer = 0 To arEncryptedChars.Length - 1 '// loop thru all Encrypted char.s in the Array.
                    '// if TextBox char ='s the char in your Array, replace the TextBox char with the same #'ed Array char of the Letters.
                    If myTextBoxChar = arEncryptedChars(i) Then .Text = .Text.Replace(myTextBoxChar, arLetterChars(i))
                Next
            Next
        End With
    End Sub
End Class

This uses 2 For/Next loops.
First loop, loops through each char. in the TextBox, one at a time. The loop inside the first loop, loops through the char.s in your Arrays, depending on which Array to use, if to encrypt or decrypt.
If a letter is the same letter as in …

debasisdas commented: agree +13
codeorder 197 Nearly a Posting Virtuoso

You said "easy", correct?:D

'// encrypt.
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With TextBox1
            .Text = .Text.Replace("a", "z").Replace("b", "y").Replace("c", "x")
        End With
    End Sub
    '// decrypt.
    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        With TextBox1
            .Text = .Text.Replace("z", "a").Replace("y", "b").Replace("x", "c")
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso
With TextBox1.Text.ToLower '// use .ToLower to NOT make it Case SensITive.
            If .Contains("something") Then MsgBox("Found.") Else MsgBox("Not Found.")
        End With
codeorder 197 Nearly a Posting Virtuoso

Hey, Nice job down voting this for someone who was just trying to get some other ideas and perspective.

How about next time you leave your name instead of dancing around like a twinkled toed douche bag.

Unhnd

Took care of it and gave you another fresh start as you did for yourself.

Company name from an IT forum member, here we go:

Evolved Construction

With a software developer's mind, Evolved should not be a difficult task.

Unhnd_Exception commented: :) +0
codeorder 197 Nearly a Posting Virtuoso

Check out this thread.

jingda commented: ;) +9
codeorder 197 Nearly a Posting Virtuoso

I can do as I please; even if it leads to breaking a vase or two, I will get my way!!!:D

Shatter

jingda commented: And you did have it your way +0
codeorder 197 Nearly a Posting Virtuoso

Have you tried TransactionFile.ToString ?
This might also be of some help.

codeorder 197 Nearly a Posting Virtuoso

Try this thread, might be easier than you think.:)
.There is also another post of mine in that thread, just above the linked one.
Hope it helps.

ninjatalon commented: thanks +3
codeorder 197 Nearly a Posting Virtuoso

>>I kinda forgot to ask if there was a way to add up all the totals for a grand total, to see how much profit was made for that one day, is that possible?

Without items in the ListView, you cannot get a "how much profit was made for that one day", now can you?

The grand total code should be placed in a Button.Click or can even be added to the same Sub that adds items to the ListView. If the same Sub, I would remove the MsgBox and have a Label instead. Also, make sure it is right after the add items code and not before.

codeorder 197 Nearly a Posting Virtuoso

I would have taken being sat on by a fat dude, not chic, being spat on, by a fat dude, not chic, but being stuck in the cigarette machine with no chance to go home with a stripper, that is plain rude!!!:'(

Granted. You turn into a beef jerky and get sold to a "reallllllllly" fat chic.

I wish I knew the things I know now, when I was first born.

codeorder 197 Nearly a Posting Virtuoso

Pass the ex.Message as a Parameter.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim x As String = ""
        Try
            x = CStr(CInt(x) + 1)
        Catch ex As Exception
            getErrorMessage(ex.Message)
        End Try
    End Sub
    Private Sub getErrorMessage(ByVal theReasonForTheError As String)
        MsgBox("Your error message is: " & vbNewLine & theReasonForTheError, MsgBoxStyle.Critical)
    End Sub
End Class

Application.Exit will close the entire application.
Me.Close will close the current Form.
Depending if set for "When last form closes" or "When startup form closes" in your project's Properties/Application tab, it will respond differently for Me.Close .

msqueen082 commented: thank you this worked great.. +1
codeorder 197 Nearly a Posting Virtuoso

See if this helps for the SaveFileDialog.

Dim myCoolSaveFileDialog As New SaveFileDialog
        If myCoolSaveFileDialog.ShowDialog = DialogResult.OK Then
            Dim FileStream As New System.IO.FileStream(myCoolSaveFileDialog.FileName, IO.FileMode.Create)
            '// rest of the code here for saving to file.
        End If
codeorder 197 Nearly a Posting Virtuoso

Granted. After the lawsuit for granting world peace and having only one human left on earth to share it, you get an independent income of $1 US per year, and no where to spend it. Btw, who would sue you? :-/

I wish that my brain was not smaller than a peanut and especially not filled with dust.
(It could happen. "I wish, I wish, I wish...")

Warrens80 commented: funny +0
codeorder 197 Nearly a Posting Virtuoso

Granted. You get one without a screen, battery, and charger. Also, it's invisible.

I wish for world peace.:D

codeorder 197 Nearly a Posting Virtuoso

To create a history in a ComboBox, when navigating to a web site, add the url address to the ComboBox.
To save and load those items, check out this thread and replace the ListBox1 with your ComboBox.
http://www.daniweb.com/software-development/vbnet/threads/359030/1531427#post1531427

For the HomePage, I would use a TextBox with a CheckBox. If the CheckBox is .Checked, then load the url address from your TextBox as your HomePage, otherwise, navigate to a blank page or the default HomePage preset by your app..

For Favorites, if your app. has a Favorites menu, add the Favorites to the selected menu option and save/load those.
If it does not have a menu, I would use a ListView to save the Favorites to, since you can add the web page's title as the item.Text and use the web page's url as the item.Tag to load the web page from.

VBrulez commented: nice +1
codeorder 197 Nearly a Posting Virtuoso

>>thats it?...
I'm afraid so, :D.

Adding that code to the textbox2.TextChanged event, it will constatly set the TextBox2's value to it while typing in your TextBox2.

If you need to add the String's value to a ListBox, use ListBox1.Items.Add(desripition) '// add String to ListBox. .

Unhnd_Exception commented: I'm afraid so :) +1
codeorder 197 Nearly a Posting Virtuoso

Place the code in a Button1.Click event and not in the TextBox1.TextChanged event.

codeorder 197 Nearly a Posting Virtuoso
If Forms(i) Is Nothing Then
codeorder 197 Nearly a Posting Virtuoso

I remember reading a while ago on http://www.w3.org/, that for security reasons, you cannot add values to <input type="file"/> .
.If this were to be allowed, files could easily be uploaded from your p.c. without your knowledge.

Best suggestion I can offer, is to click the "Browse" Button.

WebBrowser1.Document.GetElementById("the_file").InvokeMember("click")
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Dim dTotal As Double = 0 '// for adding total.
        For Each itm As ListViewItem In ListView1.Items '// loop thru items.
            With itm.SubItems(1) '// shorten code for Column 2 items.
                '// check if Not Nothing, add to total.
                If Not .Text = Nothing Then dTotal += CDbl(.Text) '// converting currency to Double will remove the $ symbol.
            End With
        Next
        MsgBox("Total : " & CDbl(dTotal).ToString("c")) '// display total with currency format.
Jake.20 commented: Thank you for the code sir. +1
codeorder 197 Nearly a Posting Virtuoso

...of limitless possiblities. When sea dweller's dreams...

codeorder 197 Nearly a Posting Virtuoso

hi,

i would like to create an uniqueID where it must add +1 behind the CurrentTranxDateTime for the transaction 1 to 10....I have coded as below but the problem is the number doesnt +1 for each transaction.....any1 have idea to solve this.....
eg: 300111 01:45:29 AM 1
300111 01:45:29 AM 2
300111 01:45:29 AM 3

dim CurrentTranxDateTime as date
dim UniqueID as string
            For i As Integer = 1 To 10
           ' UniqueID = CurrentTranxDateTime & i + 1.ToString()
           UniqueID = CurrentTranxDateTime + i.ToString()
            Next i

It does +1, but since you are running a loop and keep changing "the same" value until the loop ends, the value will always be a 10 at the end of your UniqueID .

This will give you all 10 in the same String.

UniqueID &= CStr(CurrentTranxDateTime) & i.ToString & vbNewLine
swathys commented: thank you +0
codeorder 197 Nearly a Posting Virtuoso

This will use 2 ArrayLists.
1 ArrayList is to write lines back to original rtb and the other is to add the Names to be located in the original rtb.

Public Class Form1
    Private arlRtbLines As New ArrayList '// adds rtb1 lines if string is not found in a line.
    Private arlNamesToFind As New ArrayList '// adds the Names that need to be extracted from rtb1.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        arlRtbLines.Clear() : arlNamesToFind.Clear() '// clear both if needed for new input.
        '// add names to find.
        arlNamesToFind.Add("Rachel Dawkins")
        arlNamesToFind.Add("Laura Philips")
        '// check if items to find have been added.
        RichTextBox2.Clear() '// clear output rtb.
        If Not arlNamesToFind.Count = 0 Then '// check if Names have been added to the Names to Find ArrayList.
            With RichTextBox1
                For Each rtbLine As String In .Lines '// loop thru all rtb1 lines.
                    If Not arlNamesToFind.Contains(rtbLine) Then '// if name is not found.
                        arlRtbLines.Add(rtbLine) '// add line to ArrayList for writing lines back.
                    Else
                        With RichTextBox2
                            If Not .Text = "" Then .Text &= vbNewLine & rtbLine Else .Text = rtbLine '// send line to rtb2.
                        End With
                    End If
                Next
                .Clear() '// clear rtb1 for new input to write the lines back.
                For Each itm As String In arlRtbLines
                    If Not .Text = "" Then .Text &= vbNewLine & itm Else .Text = itm '// add lines back to rtb1.
                Next
            End With
        End If
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Dim ExpDate As String = CDate(dgvBlock_Extend.Rows(icnt).Cells("Extend Door & Lift Expiry Date").Value).ToString("yyyyMMdd")
jlego commented: .. +3
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
2 RichTextBoxes, 1 Button

Public Class Form1
    Private arlRtbLines As New ArrayList '// adds rtb1 lines if string is not found in a line.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim sStringToFind As String = "Rachel Dawkins" '// String to locate.
        arlRtbLines.Clear() '// clear for new input.
        With RichTextBox1
            For Each rtbLine As String In .Lines '// loop thru all rtb1 lines.
                If Not rtbLine.Contains(sStringToFind) Then '// check first if it does not contain, since more lines probably will not.
                    arlRtbLines.Add(rtbLine) '// add line to ArrayList.
                Else
                    RichTextBox2.Text = rtbLine '// send line to rtb2.
                End If
            Next
            .Clear() '// clear rtb1 for new input to write the lines back.
            For Each itm As String In arlRtbLines
                If Not .Text = "" Then .Text &= vbNewLine & itm Else .Text = itm '// add lines back to rtb1.
            Next
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso
Dim i As Integer = 0
        Dim newItem As New ListViewItem
        With newItem
            If crunches.Checked Then '// since first item, no need to declare as New item.
                .Text = (i + 1).ToString  '// add text Item
                newItem.SubItems.Add(crunches.Text)
                ListView.ListView1.Items.Add(newItem)
            End If
            If legRaises.Checked Then
                newItem = New ListViewItem '// declare as New item.
                .Text = (i + 1).ToString  '// add text Item
                .SubItems.Add(legRaises.Text)
                ListView.ListView1.Items.Add(newItem)
            End If
            '// etc...
        End With
debasisdas commented: nice as always +8
codeorder 197 Nearly a Posting Virtuoso
If crunches.Checked Then newItem.SubItems.Add(crunches.Text)
        If legRaises.Checked Then newItem.SubItems.Add(legRaises.Text)
        '// etc...
codeorder 197 Nearly a Posting Virtuoso

See if this helps since you probably do not have columns added to your ListView.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With ListView1
            .Columns.Add("Column 1", 100) : .Columns.Add("Column 2", 100) : .Columns.Add("Column 3", 100) '// add Columns, "100" is column.Width.
            .View = View.Details '// display the Columns.
            .FullRowSelect = True '// highlight entire row when item clicked.
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Dim arDaysOfWeek() As String = {"mon", "tue", "wed", "thr", "fri", "sat", "sun"} '// days of week in "ddd" format.
        Dim isValidDay As Boolean = False
        Dim arTemp() As String = Nothing
        With TextBox1
            If .Text.Contains("-"c) Then
                arTemp = .Text.Split("-"c)
                For Each myDay As String In arDaysOfWeek '// loop thru days.
                    If myDay = arTemp(0).ToLower Then '// compare values to .Lower, for not case sensitive.
                        isValidDay = True
                        Exit For
                    End If
                Next
            Else
                MsgBox("value must contain ""-""")
                Exit Sub
            End If
        End With
        If isValidDay = False Then
            MsgBox("wrong day format")
            Exit Sub
        End If
        If Not IsNumeric(arTemp(1)) Then
            MsgBox("wrong year format")
            Exit Sub
        End If
        '// rest of code here.
        MsgBox("valid date format")
codeorder 197 Nearly a Posting Virtuoso

Being late night here, I actually wondered what a big red X looks like painted over a DataGridView. :D

I have used this in the past for Threading and it solved the issue.

Public Sub gogogo()
        If Me.InvokeRequired Then
            Me.Invoke(New MethodInvoker(AddressOf gogogo))
        Else
            '// your code here.
        End If
    End Sub

More info located here.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim x As New Memory
        MsgBox(x.GetMemory)
        End
    End Sub
End Class

Public Class Memory
    Public Function GetMemory() As String
        Dim MemBitSize As String = CStr(My.Computer.Info.TotalPhysicalMemory)
        Select Case CDec(MemBitSize)
            Case 0 To CDec(999.999)
                MemBitSize = Format(CInt(CDec(MemBitSize)), "###,###,###,###,##0 bytes")
            Case 1000 To CDec(999999.999)
                MemBitSize = Format(CInt(CDec(MemBitSize) / 1024), "###,###,###,##0 KB")
            Case 1000000 To CDec(999999999.999)
                MemBitSize = Format(CInt(CDec(MemBitSize) / 1024 / 1024), "###,###,##0 MB")
            Case Is >= 1000000000
                MemBitSize = Format(CInt(CDec(MemBitSize) / 1024 / 1024 / 1024), "#,###.00 GB")
        End Select
        Return MemBitSize
    End Function
End Class