codeorder 197 Nearly a Posting Virtuoso

Old forgotten dreams never come true.:(

codeorder 197 Nearly a Posting Virtuoso

If I am am am, Then I'm Not Not Not, a nut!, or am I Not? :D

codeorder 197 Nearly a Posting Virtuoso

>>Form3 f3=new Form3();
That looks entirely like C#.code and will "ALWAYS" give you an error in VB.NET.

AndAlso, as soon as you declare as "New Form3", you will "ALWAYS" load a new.instance of a Form.

codeorder 197 Nearly a Posting Virtuoso

Not really, though close.

With ListBox1
            If Not .SelectedIndex = -1 Then '// if .item selected.
                Dim L1SI As String = .SelectedItem
                '// run code here for up/down.
                .SelectedItem = L1SI
            End If
        End With
codeorder 197 Nearly a Posting Virtuoso

Thanks for input NewUserVB.Net, though I'll wait for the o.p's(original.poster's) input on this; only makes sense Not to go way out of my way, when I possibly only have to walk a few steps Then be back on my original.path.:)

codeorder 197 Nearly a Posting Virtuoso

I think it also works for one item, the first, which just makes programming that much more interesting for the rest of us big kids, we get bad toys to play with.:D

I'll see what I can do and will try to post something reasonable as soon as I have something reasonable. Should be no time, If Not for Assasin's Creed:Revelations:D, though almost at the end of story.:(

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
New Project, 1.TabControl(No Tabs), 1.Button(on.Form)

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

    Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        With TabControl1
            If Not .TabPages.Count = 0 Then
                Dim sTemp As String = ""
                For Each myTab As TabPage In .TabPages
                    If Not sTemp = "" Then sTemp &= vbNewLine & wb(myTab).Url.AbsoluteUri Else sTemp = wb(myTab).Url.AbsoluteUri
                Next
                File.WriteAllText(myCoolWebBrowserSessionFile, sTemp)
            End If
        End With
    End Sub
    Private Function wb(ByVal selTab As TabPage) As WebBrowser
        Return CType(selTab.Controls.Item(0), WebBrowser)
    End Function

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If File.Exists(myCoolWebBrowserSessionFile) Then
            Dim arTemp() As String = File.ReadAllLines(myCoolWebBrowserSessionFile)
            For Each itm As String In arTemp
                addTab(itm)
            Next
        End If
    End Sub
    Private Sub addTab(ByVal selUrl As String)
        Dim tab As New TabPage, wb As New WebBrowser With {.Dock = DockStyle.Fill}
        tab.Controls.Add(wb) : TabControl1.TabPages.Add(tab) : wb.Navigate(selUrl)
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        addTab("google.com")
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

I would personally use a File(possibly .txt or .ini) for I personally like having the option to locate my Default WebBrowsers ToolBar links, etc., and be able to view them just by browsing my.p.c..

codeorder 197 Nearly a Posting Virtuoso

What exactly is the issue?
.moving the items up/down?
.or selecting the previously selected.Item with a new Index?

codeorder 197 Nearly a Posting Virtuoso

See if this helps to load Form2 from Form1, into the MDI Form.

Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With Form2
            .MdiParent = myCoolMDIform '// set the MDI Parent for the Form.
            .Show() '// Load the Form.
        End With
    End Sub
End Class

AndAlso, this to Not create a new.instance of Form2.

Public Class Form2

    Private Sub Form2_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        e.Cancel = True '// .Cancel closing the Form.
        Me.Hide() '// ...and .Hide it.:)
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

How does one figure out the #1, if there is no # involved?

If they never figure out the "#1", will they ever figure out the "#2"?:D

codeorder 197 Nearly a Posting Virtuoso

A mile for a smile can change the world, therefore you should start running.

Love for kids is shared between the heart of tots, with your heart linking the connection.

Humans in cages are for animals that live as heartless humans.

If Homer the Philosopher had a doughnut, would he still have said "Mmmm..., Doughnut!!!"?

codeorder 197 Nearly a Posting Virtuoso

Beauty of creating unknown creation isNot only for the passion of a petal, it is also for the strength of a thorn.

Anger of realization for ancient wisdom isNot a beauty that shall ever be forgotten, "capiche".

codeorder 197 Nearly a Posting Virtuoso

To make progress, you have to leave the past behind and .Move forward.

codeorder 197 Nearly a Posting Virtuoso

thecoder2012, I somewhat understand what you are asking, do correct .Me If I am wrong.:)

You have items in the AutoComplete as "12,13,14,21,23,24".
You start typing "1", of course, AutoComplete starts.
You press the Keys.Enter, and you would like to continue typing in TextBox, though have the AutoComplete."RELOAD" again and give you more options "again".

If this is on the right.path, I am not sure If the .Default AutoComplete that comes w/vb.net allows such and you might have to create your own Custom.AutoComplete.

Being a new morning for a new bright.day, I have this idea.suggestion.
.1 Add a TextBox.
2. Add a "ContextMenuStrip" and use that as your AutoComplete.
.3 Have the "ContextMenuStrip" Load/.Show with all of your AutoComplete.Items, and when you press enter, to ."re"Load/Show" w/the AutoComplete.Items from the .SubString of the TextBox, where you pressed Keys.Enter last.

Could be a fun little project to work on, thus I will let you have fun w/it and I will Challenge a mythical.history with Assasin's Creed:Revelations.:D

If .My above idea/suggestion is something you think it is possible, I especially do, do give it a Go and post results of your progress.
If Nothing or something achieved and I need to boot up vb.net, do let .Me know, of course, after you started making some progress.

Hope this helps and that the New Year will be a Challenging and Happy New Year, for you and …

codeorder 197 Nearly a Posting Virtuoso

A murderer's formula of religious belief: with the act of revealing or disclosing, is none other than Assassin's Creed: Revelations defined.

zeroliken commented: That's a great game :) +0
codeorder 197 Nearly a Posting Virtuoso

I have added Nothing to this thread, for Everything was already added.

codeorder 197 Nearly a Posting Virtuoso

Thanks for the necessary details to get "another" +=1 to my Solved.Threads list.:D

Imports System.IO
Public Class Form1
    Private myCoolFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\myCoolBtnTextFile.txt"

    Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        With Button2
            If Not .Tag Is Nothing Then File.WriteAllText(myCoolFile, .Text & vbNewLine & .Tag) '// save.File.
        End With
    End Sub

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If File.Exists(myCoolFile) Then
            Dim arCoolT() As String = File.ReadAllLines(myCoolFile) '// read File into Array.
            With Button2
                .Text = arCoolT(0) '// line.1
                .Tag = arCoolT(1) '// line.2
            End With
        End If
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With New OpenFileDialog
            .Title = "Select a Cool File to load..."
            ' .Filter = ""
            If .ShowDialog = Windows.Forms.DialogResult.OK Then
                Button2.Text = IO.Path.GetFileName(.FileName) '// only FileName and .ext.
                Button2.Tag = .FileName '// FullPath of .File, to load .File from.
            End If
        End With
    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        With Button2
            If Not .Tag Is Nothing Then Process.Start(.Tag)
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Then a Button.Click shall be.:)

Public Class Form1
  
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        MsgBox("rtb is accurate = " & validateCoolRTB(RichTextBox1, 7))
    End Sub
    Private Function validateCoolRTB(ByVal selCoolRTB As RichTextBox, ByVal iIDlengthThatIsAlsoCooLxD As Integer) As Boolean
        For Each itm As String In selCoolRTB.Lines '// loop thru lines.
            If Not itm.Length = iIDlengthThatIsAlsoCooLxD Then Return False '// get.lenght of line and If Not accurate, Return False.
        Next
        Return True '// If all checks out OK, Then Return True.:)
    End Function
End Class
codeorder 197 Nearly a Posting Virtuoso

How do you plan to:>>check if a line in the RTB = 7
.Button.Click?, rtb.Click?, waving your hand?

codeorder 197 Nearly a Posting Virtuoso

Wanted to add; Try searching for how to get "elements?" of the Title Column, and If no luck, start a new thread. Catch ex as Message no.msg'es here End Try

codeorder 197 Nearly a Posting Virtuoso

Wish I could be of further.support, though hobbyist.programmer here and db isNot a hobby, it's business; and the best part is, it's none of my god dam.n business.:D

Good luck and glad that you are at least getting "some" results.:)

codeorder 197 Nearly a Posting Virtuoso

It probably does not work because you are Not loading the file.

codeorder 197 Nearly a Posting Virtuoso

>>Should we still post the solution ?
I should down.vote your butt just for asking that question.:D

Adding on to azzdog_dev post,...
+= it keeps our forum a little more IT, Nothing Else .:)

codeorder 197 Nearly a Posting Virtuoso

>>just tell me how to save in this button please refer the below code
Can you explain a little more in.depth?; as to If you would like a SaveFileDialog to save the File or save the Button it's self to a File?

codeorder 197 Nearly a Posting Virtuoso
locateAndHighlightCoolWordFromSearch(TextBox1.Text, RichTextBox1)

That should trigger that "Sub" and fire off the code w/in it.
I would add it to your ListBox.SelectedIndexChanged, though adding it to a Button should do the job just nicely.

codeorder 197 Nearly a Posting Virtuoso

To change the users from "dummy" to "real...dummies?:D"(kidding), uhhmmm...:D

Instead of the For/Next loop that loops thru the arDummyUsers: For Each dummyUser As String In arDummyUsers use a loop similar to: For Each coolLoginUser As String In (Database1DataSet) table(Users) . I personally have no idea how to retrieve info from the db(database), though it seems like no issue for some to do.

>>how can i align them to the center
You can easily modify the .Location and everything else, by changing their Properties, as they are:

With Panel1.Controls
                .Add(New PictureBox With {.BorderStyle = BorderStyle.Fixed3D, .Width = 95, .Height = 95, .Left = 5, .Top = iCoolPictureBoxLocY})
                .Add(New Label With {.Text = dummyUser, .BorderStyle = BorderStyle.Fixed3D, .AutoSize = False, .Width = dummyUser.Length * 20, .Left = 100, .Top = iCoolPictureBoxLocY + 45})
            End With

...it just takes a bit of patience to get the results you want, If Not greater.:)

codeorder 197 Nearly a Posting Virtuoso

Then welcome back U.2 also.:D

Btw, since U2 is back:D, here's something U2 can catch up with.
I down.voted Dani(our.queen) and the best part is, I sweated and laughed for a few days afterwards.:D Not sure if the sweating or the laughing is the best part, though I feel honored to possibly be the first to do as. Just thought I'd ketchup U2:D with the forum progress, for google.images and random words are better than a cup of coffee in the morning.:)

codeorder 197 Nearly a Posting Virtuoso

There is no doubt that I am human, for I live like a God.

codeorder 197 Nearly a Posting Virtuoso

If new things to learn is vb.net and dust in your brain, Then I'm the man for the job.:D

codeorder 197 Nearly a Posting Virtuoso

I would like to welcome.back yourself also.:D
It's always a pleasure to have someone around with new.input towards the IT community.:)

codeorder 197 Nearly a Posting Virtuoso

See if this helps to get you started.
1.Panel

Public Class Form1
    Private arDummyUsers() As String = {"dummy 1", "dummy 2", "what the h.ll, another dummy xD"}

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        With Panel1
            .BackColor = Color.LightSteelBlue
            .AutoScroll = True '// Allows scrollbars if Controls are added and not .Visible.
        End With
        createCoolLoginDummies()
    End Sub

    Private Sub createCoolLoginDummies()
        Dim iCoolPictureBoxLocY As Integer = 5
        For Each dummyUser As String In arDummyUsers
            With Panel1.Controls
                .Add(New PictureBox With {.BorderStyle = BorderStyle.Fixed3D, .Width = 95, .Height = 95, .Left = 5, .Top = iCoolPictureBoxLocY})
                .Add(New Label With {.Text = dummyUser, .BorderStyle = BorderStyle.Fixed3D, .AutoSize = False, .Width = dummyUser.Length * 20, .Left = 100, .Top = iCoolPictureBoxLocY + 45})
            End With
            iCoolPictureBoxLocY += 100
        Next
        Panel1.Select()
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso
YourCoolLabelToDisplayScoreInt.Text = ScoreInt.ToString

...should be added somewhere w/in your Private Sub ButtonGuessAnswer_Click Sub, possibly the very last line of code.

codeorder 197 Nearly a Posting Virtuoso

If you were able to load a File into the rtb(RichTextBox), Then .Replace the current.Sub that locates and highlights, w/this one.

Private Sub locateAndHighlightCoolWordFromSearch(ByVal selCoolWord As String, ByVal selCoolRTB As RichTextBox)
        With selCoolRTB
            If .HideSelection = True Then .HideSelection = False '// Display Highlighted.Text.
            .Find(selCoolWord, 0, .TextLength, RichTextBoxFinds.None)
        End With
    End Sub

The "HideSelection" should be set in the rtb's.Properties and Not constantly checked If ='s False.

codeorder 197 Nearly a Posting Virtuoso

Took a lot less.time to do than expected, even took a sh.t in the .Process.Start(xD).

Private Sub moveFiles(ByVal selOriginalLocationFolder As String, ByVal selDestinationFolder As String)
        If Directory.Exists(selOriginalLocationFolder) Then
            If Not Directory.Exists(selDestinationFolder) Then Directory.CreateDirectory(selDestinationFolder)
            Dim iMoved As Integer = 0, iRenamed As Integer = 0
            '///////////////////////////////////////////////////////////////////////
            Dim iFileCopyNumber As Integer = 1 '// ADDED THIS.
            '///////////////////////////////////////////////////////////////////////
            With My.Computer.FileSystem
                For Each foundFile As String In .GetFiles(myOriginalFilesFolder, FileIO.SearchOption.SearchAllSubDirectories, "*")
                    '// check if File already.Exists in Destination.Folder
                    If Not File.Exists(selDestinationFolder & Path.GetFileName(foundFile)) Then
                        .MoveFile(foundFile, selDestinationFolder & Path.GetFileName(foundFile))
                        iMoved += 1
                    Else '// If it Exists in Destination.Folder, .Rename.File
                        '///////////////////////////////////////////////////////////////////////
                        Do Until Not File.Exists(selDestinationFolder & Path.GetFileNameWithoutExtension(foundFile) & " - Copy (" & iFileCopyNumber.ToString & ")" & Path.GetExtension(foundFile))
                            iFileCopyNumber += 1
                        Loop
                        .MoveFile(foundFile, selDestinationFolder & Path.GetFileNameWithoutExtension(foundFile) & " - Copy (" & iFileCopyNumber.ToString & ")" & Path.GetExtension(foundFile))
                        iRenamed += 1
                        '///////////////////////////////////////////////////////////////////////
                    End If
                Next
            End With
            MsgBox("Files.Moved: " & iMoved & vbNewLine & "Files.Renamed: " & iRenamed, MsgBoxStyle.Information)
        End If
    End Sub
codeorder 197 Nearly a Posting Virtuoso

>>How can I assign the following to your "Private arDummyFiles() As String" array?
Instead of looping thru the Dummy.Array in loadFilesToArrayLis , loop thru your For/Next loop that locates the Files and add the founFile to the ArrayList.

Regarding If File.Exists Then .Rename, I'll get back to you in a little while.:)

codeorder 197 Nearly a Posting Virtuoso

If you did not use the "most".recent code I posted and you just edited the previous.code posted, re.read this:
<<To make things easier, I changed line.20 .From: selListBoxForResults.Items.Add(Path.GetFileNameWithoutExtension(itm)) .To: selListBoxForResults.Items.Add(Path.[B]GetFileName[/B](itm)) .

This will add the .FileName "with" the .FileExtension to your ListBox when loading the search.result Files.

SubFolder?
Change this: For Each itm As String In Directory.GetFiles(selCoolFolder, "*", SearchOption.[B]TopDirectoryOnly[/B]) To: For Each itm As String In Directory.GetFiles(selCoolFolder, "*", SearchOption.[B]AllDirectories[/B]) Just a note; Most of the time you can delete an option as "" all the way up to the "dot" and you will get a list of other possible options from IntelliSense. I learned a great deal after figuring that out.:)

>>Ok, i don't understand what do this:
It just changes the .Cursor from your Default.Cursor, to a cute little "Hand".Cursor.:D
If you don't like my goodies, just say so; don't throw sh.t in my face!!! F.CK!!!:D (just.kidding,(wink)).

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
New.project, 1.Button, 1.CheckedListBox

Imports System.IO
Public Class Form1
    Private arlFiles As New ArrayList
    Private arDummyFiles() As String = {"c:\blah.txt", "a:\blah again.txt", "d:\another blah.txt", "b:\end of blah.txt"}
    Private mySplitter As String = "|", sT As String '// TEMP.String.

    Private Sub loadFilesToArrayList(ByVal selArrayList As ArrayList)
        For Each itm As String In arDummyFiles
            selArrayList.Add(Path.GetFileName(itm) & mySplitter & Path.GetDirectoryName(itm)) '// dis.align coordinates. xD
        Next
        selArrayList.Sort()
        ' MsgBox(selArrayList(0)) '// FOR TESTING.
        loadFilesToCheckedListBox(CheckedListBox1)
    End Sub
    Private Sub loadFilesToCheckedListBox(ByVal selCheckedListBox As CheckedListBox)
        With selCheckedListBox.Items
            .Clear()
            For Each itm As String In arlFiles
                .Add(itm.Substring(0, itm.IndexOf(mySplitter)))
            Next
        End With
    End Sub
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        loadFilesToArrayList(arlFiles)
    End Sub

    Private Sub CheckedListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles CheckedListBox1.SelectedIndexChanged
        With CheckedListBox1
            If Not .SelectedIndex = -1 Then
                sT = arlFiles(.SelectedIndex)
                sT = sT.Substring(sT.IndexOf(mySplitter) + 1) & sT.Substring(0, sT.IndexOf(mySplitter)) '// re.align coordinates. xD
                MsgBox(sT)
            End If
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

To make things easier, I changed line.20 .From: selListBoxForResults.Items.Add(Path.GetFileNameWithoutExtension(itm)) .To: selListBoxForResults.Items.Add(Path.[B]GetFileName[/B](itm)) .

This will add the .FileName "with" the .FileExtension to your ListBox when loading the search.result Files.

Regarding the ListBox.SelectedIndex and loading the .File with the line selected, see if this helps.:)

Imports System.IO
Public Class Form1
    Private myCoolFilesFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\vb.samples\"
    Private sT As String = Nothing

    Private Sub _Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        searchFilesForCoolWords(myCoolFilesFolder, TextBox1.Text, ListBox1)
    End Sub

    Private Sub _ListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        With ListBox1
            If Not .SelectedIndex = -1 Then '// check if .Item Selected.
                Select Case Path.GetExtension(.SelectedItem).ToLower
                    Case ".rtf", ".etc" '// load.File with color synthax If a WordPad/etc. type.Doc.
                        RichTextBox1.LoadFile(myCoolFilesFolder & .SelectedItem, RichTextBoxStreamType.RichText)
                    Case Else '// load.File as simple .txt File.
                        RichTextBox1.LoadFile(myCoolFilesFolder & .SelectedItem, RichTextBoxStreamType.PlainText)
                End Select
                locateAndHighlightCoolWordFromSearch(TextBox1.Text, RichTextBox1)
            End If
        End With
    End Sub

#Region "-----===-----===-----=== SEARCH AND HIGHLIGHT ===-----===-----===-----"

    Private Sub searchFilesForCoolWords(ByVal selCoolFolder As String, ByVal selSearchString As String, ByVal selListBoxForResults As ListBox)
        If Directory.Exists(selCoolFolder) Then
            With ProgressBar1
                .Maximum = Directory.GetFiles(selCoolFolder).Length
                .Value = 0
            End With
            selListBoxForResults.Items.Clear() '// .Clear for new.input.
            For Each itm As String In Directory.GetFiles(selCoolFolder, "*", SearchOption.TopDirectoryOnly)
                sT = File.ReadAllText(itm) '// Read File.
                If sT.Contains(selSearchString) Then
                    ' selListBoxForResults.Items.Add(itm) '// Full.Path of File.
                    selListBoxForResults.Items.Add(Path.GetFileName(itm))
                End If
                ProgressBar1.Value += 1
            Next
        End If
    End Sub

    Private Sub locateAndHighlightCoolWordFromSearch(ByVal selCoolWord As String, ByVal selCoolRTB As RichTextBox)
        '//--- RTB.HighLight code boosted from:
        '// http://www.vbdotnetforums.com/editors/27186-find-select-multiple-words-richtextbox.html#post81507
        '---\\
        With selCoolRTB
            Dim iIndexLocation As Integer = 0
            While iIndexLocation < .Text.LastIndexOf(selCoolWord)
                .Find(selCoolWord, …
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1.Button andAlso you will need to set your "Original" Folder.Path.

Imports System.IO
Public Class Form1
    Private myDesktopFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\"
    Private myOriginalFilesFolder As String = myDesktopFolder & "vb.samples - Copy\", _
        myDestinationFilesFolder As String = myDesktopFolder & "TEMP\"


    Private Sub moveFiles(ByVal selOriginalLocationFolder As String, ByVal selDestinationFolder As String)
        If Directory.Exists(selOriginalLocationFolder) Then
            If Not Directory.Exists(selDestinationFolder) Then Directory.CreateDirectory(selDestinationFolder)
            Dim iMoved As Integer = 0, iDeleted As Integer = 0
            With My.Computer.FileSystem
                For Each foundFile As String In .GetFiles(myOriginalFilesFolder, FileIO.SearchOption.SearchAllSubDirectories, "*")
                    '// check if File already.Exists in Destination.Folder
                    If Not File.Exists(selDestinationFolder & Path.GetFileName(foundFile)) Then
                        .MoveFile(foundFile, selDestinationFolder & Path.GetFileName(foundFile))
                        iMoved += 1
                    Else '// If it Exists in Destination.Folder, .Delete from Original.Folder.
                        .DeleteFile(foundFile, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
                        iDeleted += 1
                    End If
                Next
            End With
            MsgBox("Files.Moved: " & iMoved & vbNewLine & "Files.Deleted: " & iDeleted, MsgBoxStyle.Information)
        End If
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        moveFiles(myOriginalFilesFolder, myDestinationFilesFolder)
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Try loading/saving the password to a File or My.Settings.
http://www.daniweb.com/software-development/vbnet/threads/312128/1335997#post1335997


I would encrypt the password a little, with something as simple as:
http://www.daniweb.com/software-development/vbnet/threads/375789/1617323#post1617323

Hope this helps.:)

adam_k commented: Agree, much better than xml for this use +8
codeorder 197 Nearly a Posting Virtuoso

Something simple, use a .txt File. This saves the File to Desktop.

Imports System.IO
Public Class Form1
    Private myCoolFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\myCoolBtnTextFile.txt"

    Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        File.WriteAllText(myCoolFile, Button1.Text)
    End Sub
 
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If File.Exists(myCoolFile) Then Button1.Text = File.ReadAllText(myCoolFile)
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        With ListBox1
            If Not .SelectedIndex = -1 Then Button1.Text = .SelectedItem Else Button1.Text = ""
        End With
    End Sub
End Class
NewUserVB.Net commented: he his the best +1
codeorder 197 Nearly a Posting Virtuoso

See if this helps to get you started.
1.TextBox,1.Button,1.ListBox,1.ProgressBar

Imports System.IO
Public Class Form1
    Private myCoolFilesFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\vb.samples\"
    Private sT As String = Nothing

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        searchFilesForCoolWords(myCoolFilesFolder, TextBox1.Text, ListBox1)
    End Sub
    Private Sub searchFilesForCoolWords(ByVal selCoolFolder As String, ByVal selSearchString As String, ByVal selListBoxForResults As ListBox)
        If Directory.Exists(selCoolFolder) Then
            With ProgressBar1
                .Maximum = Directory.GetFiles(selCoolFolder).Length
                .Value = 0
            End With
            selListBoxForResults.Items.Clear() '// .Clear for new.input.
            For Each itm As String In Directory.GetFiles(selCoolFolder, "*", SearchOption.TopDirectoryOnly)
                sT = File.ReadAllText(itm) '// Read File.
                If sT.Contains(selSearchString) Then
                    ' selListBoxForResults.Items.Add(itm) '// Full.Path of File.
                    selListBoxForResults.Items.Add(Path.GetFileNameWithoutExtension(itm))
                End If
                ProgressBar1.Value += 1
            Next
        End If
    End Sub
End Class

I added a ProgressBar, just because it's "kewwl":D; though you can always comment out the ProgressBar code.lines.

codeorder 197 Nearly a Posting Virtuoso

Try Repairing/Reinstalling Visual Studios. Could be an internal issue w/VS, although...
If this only happens in one project, cloning/restarting the project might and possibly will fix the issue.

I personally would Reinstall(after saving my.Cool VS.Settings, If you got any), to get a new copy of VS. Hope this helps.

codeorder 197 Nearly a Posting Virtuoso

I'm not quite certain as to exactly what the issue is, as bluehangook629 mentioned about the broken.link, though here's a suggestion that seems to work w/Forms and graphix on them. Set the Form's Properties of "DoubleBuffered" to True. It might help w/the rendering, If rendering is an issue.

codeorder 197 Nearly a Posting Virtuoso

Question 1, check line.25.
If you want to keep score up to date and Not constantly resetting it's self to "0" before it adds a +1 to it, .Remove the line. Hope this helps.

Almost missed this. :D
Line.59, same issue. .Remove it and your score should update as needed.

codeorder 197 Nearly a Posting Virtuoso

Should I start to blame or Not to blame?, since I am the only one that gets blamed.

codeorder 197 Nearly a Posting Virtuoso

Not a Function, though it gets the job done.

Public Class Form1
    Private iT As Integer = Nothing '// TEMP.Integer to get # at end of TextBoxes.

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        setHandlersForCoolTextBoxes()
    End Sub

    Private Sub setHandlersForCoolTextBoxes()
        '/////////////////////////////////////////////////////////////////
        For Each txt As TextBox In New TextBox() {TextBox1, TextBox2, TextBox3, TextBox4} '// add your TextBoxes here.
            '/////////////////////////////////////////////////////////////////
            AddHandler txt.KeyDown, AddressOf _myCoolTextBoxes_KeyDown
        Next
    End Sub

    Private Sub _myCoolTextBoxes_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs)
        If e.KeyCode = Keys.Enter Then setFocusToNextCoolTextBox(CType(sender, TextBox)) '// send current TextBox to Sub.
    End Sub

    Private Sub setFocusToNextCoolTextBox(ByVal selCurrentCoolTextBox As TextBox)
        With selCurrentCoolTextBox.Name
            iT = CInt(.Substring(.LastIndexOf("x") + 1)) + 1 '// get # at end of TextBo"x"# and add+1 for next TextBox, if Available.
        End With
        If Not CType(Me.Controls("TextBox" & iT.ToString), TextBox) Is Nothing Then '// if Available.
            With CType(Me.Controls("TextBox" & iT.ToString), TextBox)
                .Select()
                .BackColor = Color.LightSkyBlue  '// FOR.TESTING.
            End With
        Else
            MsgBox(".you need more TextBoxes you s.o.b.! xD", MsgBoxStyle.Information, ".just because.")
        End If
    End Sub
End Class
adam_k commented: Nice +8
M.Waqas Aslam commented: exactly what i needed :) cheers +5
bilal_fazlani commented: awessome!! +2
codeorder 197 Nearly a Posting Virtuoso

If I do.k.Not bother w/your.problems, will you bother with.mine?

codeorder 197 Nearly a Posting Virtuoso

Will I do Nothing tomorrow If I had a Code's Soul to read?