codeorder 197 Nearly a Posting Virtuoso

Does not adding the code from your thread for "Need help with background music" work if added to a Button.Click?

codeorder 197 Nearly a Posting Virtuoso

I cant seem to get the post before the other one to work
i just want it to go through and ping the selected websites in the list

Just wondering, each site that you load and ping in the WebBrowser, does it load a new page that you need to view/get confirmation before it moves on to try and ping another site?

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private myCoolList As New List(Of Integer) '// List to store your SelectedIndexes.

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If Not myCoolList.Contains(ComboBox1.SelectedIndex) Then '// check if not already added.
            myCoolList.Add(ComboBox1.SelectedIndex) '// add to list.
        Else
            MsgBox("This item has been previously viewed.") '// alert if already viewed.
        End If
    End Sub
End Class
myCoolList.Clear() '// Clear the List if needed.
codeorder 197 Nearly a Posting Virtuoso

Can you supply some more details?
And, is this for asp.net or for use in a vb.net WebBrowser?

codeorder 197 Nearly a Posting Virtuoso

Have you attempted this with the code provided in your File wipe & drag-n-drop support thread?

By means of "a determined value", is that for file size or the content length in your file?

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 Button

Imports System.Xml
Public Class Form1
    Private myXML_FileLocation As String = "C:\test.xml" '// .xml file and location.
    Private xmlDoc As New XmlDocument, xmlSelectedNode As XmlNode

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        xmlDoc.Load(myXML_FileLocation) 'Load the Xml file once if constantly in use.
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        getXMLnodeByID("2")
    End Sub
    Private Sub getXMLnodeByID(ByVal IDToUse As String)
        xmlSelectedNode = xmlDoc.SelectSingleNode("Subject/Items/Item[@id='" & IDToUse & "']")
        With xmlSelectedNode
            MsgBox(.SelectSingleNode("CustName").InnerText)
            MsgBox(.SelectSingleNode("Filename").InnerText)
            MsgBox(.SelectSingleNode("StartDate").InnerText)
            '// etc...
        End With
    End Sub
End Class

I noticed that your .xml file has <Item id="1"> which is all LowerCase and you were using ("/Subject/Items/Item[@ID='1']") .ToUpper, which will result in errors. At least it did on my part.

codeorder 197 Nearly a Posting Virtuoso

>...I can see you have a "Private FixTex(35) As String". Am I right to assume that is declaring all 36 FixTex values in go?...
You are correct.
Instead of declaring FixTex1, FixTex2,FixTex3 As String, you declare all 36 Strings with FixTex(35) in one shot, as a String Array.

>...since you have a "(0)" in the next bit, it's another of those silly thing that starts at 0 instead of 1.
Index based always starts at "0", not "1" like .Length or .Count.

>...in the Form Load, you've stated three of the FixTex's, I presume that's because to type all 36...
That is just a way to add values to the declarations and if needed, a separate Sub just for that purpose could be of use. A For/Next loop would be even better.

>...it'll be sleeker and less verbose than what I came up with myself.
Even if I came up with something myself, the more I use vb.net, the more "sleeker" ways I can figure out how to enhance something that I have previously enhanced. Makes me feel like a newbie sometimes, which is always a good thing.

About the:
>...another way to step through a fixed alphabet and then substitute it for a scrambled one that will work in reverse as well,...
See if this helps.
1 Button

Public Class Form1
    Private myChars() As Char = "ABCDE"

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e …
codeorder 197 Nearly a Posting Virtuoso

Could have been a similar code from an entirely different link.
Probably had a missing dot somewhere, causing the entire code to be useless.

Good to hear that you do some research before posting a thread and glad that I could provide some assistance, even if it is the 100th time doing so.:)

codeorder 197 Nearly a Posting Virtuoso

Check out this link.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private FixTex(35) As String

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        FixTex(0) = "something"
        FixTex(5) = "something else"
        FixTex(29) = "and some something more or less"
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For i As Integer = 0 To FixTex.Length - 1
            If Not FixTex(i) = Nothing Then
                MsgBox(FixTex(i))
            End If
        Next
    End Sub
End Class

Having 100 Strings instead of 100 TextBoxes should enhance the performance of your application quite a bit.

First of all, the text does not have to load in the TextBoxes and have your application draw the text in them.
Second, not really sure what other type of stuff goes on as to checking if any event has to fire when adding/changing text, etc.. I have yet not ventured to finding out how the .Net Framework responds.
And finally, that is 100 less controls with Properties that are not added to your application.

So I will have FixTex1 through to FixTex36 for my fixed alphabet and MixTex1 through to MixTex36 for my mixed/scrambled alphabet.

If you just need to loop through letters in the alphabet, scrambled or not, let me know. There is a much simpler solution for such.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 ComboBox

Public Class Form1
   
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '//--- For testing purposes.
        Dim arTemp() As String = {"ComboBox1", "AutoCompleteSource", "AddRange", "Items", "With", "End With"}
        ComboBox1.Items.AddRange(arTemp) '---\\
        '==============================
        '//These options can be located in the ComboBox's Properties.
        ComboBox1.AutoCompleteSource = AutoCompleteSource.CustomSource
        ComboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend '// also "Append", "None", and "Suggest".
        '// use this to load/reload the AutoCompleteList with the ComboBox items.
        loadMyCoolAutoCompleteList(ComboBox1)
    End Sub

    Private Sub loadMyCoolAutoCompleteList(ByVal selectedComboBox As ComboBox)
        selectedComboBox.AutoCompleteCustomSource.Clear() '// Clear AutoCompleteList.
        For Each itm As String In selectedComboBox.Items '// loop thru all items in the ComboBox.
            selectedComboBox.AutoCompleteCustomSource.Add(itm) '// add item to your AutoCompleteList.
        Next
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Haha ma bad :( not in a good mood some kid reported my username and it got changed.. >.>...

Sorry to hear such, is it ok if I move on with my life now?:D

codeorder 197 Nearly a Posting Virtuoso

Do I have to make another guess and assume that you only have 2 Buttons?

See if this helps.

Private Sub myCoolRadioButtons_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
                                                Handles RadioButton1.CheckedChanged, RadioButton2.CheckedChanged, RadioButton3.CheckedChanged '// etc..
        '// get # from RadioButton#.
        Dim x As String = CType(sender, RadioButton).Name.Substring(CType(sender, RadioButton).Name.IndexOf("n") + 1)
        '// enable/disable the Button that ends with the same # as your RadioButton.
        CType(Me.Controls("Button" & x), Button).Enabled = CType(sender, RadioButton).Checked
    End Sub

If that code is a little too complicated, you can use the following code sample.

Private Sub myCoolRadioButtons_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
                                                Handles RadioButton1.CheckedChanged, RadioButton2.CheckedChanged, RadioButton3.CheckedChanged '// etc..
        If RadioButton1.Checked Then Button1.Enabled = True Else Button1.Enabled = False
        If RadioButton2.Checked Then Button2.Enabled = True Else Button2.Enabled = False
        If RadioButton3.Checked Then Button3.Enabled = True Else Button3.Enabled = False
        '// etc.
    End Sub
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
2 TextBoxes, 1 Button, 1 ListBox

Public Class Form1
    '// lowercase for testing against lowercase Text from the TextBox.
    Private myMonths() As String = {"january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"}

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBox1.Text = "March" : TextBox2.Text = "10"
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ListBox1.Items.Clear() '// clear for new input.
        Dim iMonthNumber As Integer = 0
        '// get the starting month by #.
        For i As Integer = 0 To myMonths.Length - 1 '// loop thru all arrays in the myMonths String Array.
            '// use .ToLower since user can type a "month" as "MonTh" and it will still get recognized.
            If TextBox1.Text.ToLower = myMonths(i) Then '// check if TextBox.Text equals the month in your myMonths String Array.
                iMonthNumber = i  '// add the month number that coresponds to the month in your myMonths String Array.
                Exit For '// Exit the loop since month was located.
            End If
        Next
        '// add months.
        For i As Integer = 1 To CInt(TextBox2.Text) '// loop from 1 to as many years.
            For x As Integer = 0 To myMonths.Length - 1 '// loop thru all months.
                '// if first item in ListBox, add the found month. vbProperCase to Capitalize first letter.
                ListBox1.Items.Add(StrConv(myMonths(iMonthNumber), vbProperCase))
                iMonthNumber += 1 '// increase to add the next month.
                If iMonthNumber = myMonths.Length Then iMonthNumber = 0 '// if monthNumber …
codeorder 197 Nearly a Posting Virtuoso

All the controls you need with the proper names are posted in my previous post.
The text that is in bold has: # of controls of same type(name of each control of that type).
3 RadioButtons(rbBadCredit, rbOkCredit, rbGoodCredit)
This means that you need to add 3 RadioButtons from the Toolbox, and name each one of them as they are named withing the parenthesis. For example, RadioButton1 should be named "rbBadCredit", RadioButton2 named "rbOkCredit", and so on for the rest of the controls.
.I do apologize for the confusion.

The 120 from line 21 was taken from the example you gave.
I just copied and pasted it to line 20 so I can use it as reference when trying to figure out the equation. Had no luck:( and got a bike instead of a car.
Florida here, never to cold for a bike.:D

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

'----------------------EXIT ROUTINE---------------------------------------------------------------------
    Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
        Me.Close() '// cause app to close.
    End Sub
    '----------------------END EXIT ROUTINE-----------------------------------------------------------------
    Private Sub frmRODSelectPage_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        '// when app. closes, it fires off this event just before it is done and will close.  no need to add Me.Close here.
        MsgBox("Are you sure you want to quit?", MsgBoxStyle.YesNo, "Exit Program?")
        System.IO.File.AppendAllText("E:\MILWAUKEE\FlexiCaptureImageFolder\log.txt", txtShowFileCopy.Text)
    End Sub
ayarton commented: Excellent response!!! +1
codeorder 197 Nearly a Posting Virtuoso

Since using a String and not a Number, use the "&" to "add to" the value of a String and not try and "add up" the value of a String by using "+".

if checkbox1.checked then textboxtext &= " checkbox1, "

Even though the "+" will probably work, have not tested, it is better for you and others in the long run when reviewing code. If "&", you will know that it "adds to" the value, and not "add up" the value.

Hope this helps.

jlego commented: thats code, gave me usefull advice + +2
codeorder 197 Nearly a Posting Virtuoso

1 RadioButton, 1 Button

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        If RadioButton1.Checked Then Button1.Enabled = True Else Button1.Enabled = False
    End Sub
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 WebBrowser, 1 Button

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not WebBrowser1.IsBusy Then '// make sure the webpage finished loading.
            If WebBrowser1.Url.AbsoluteUri = "http://www.threatexpert.com/submit.aspx" Then '// check if correct website.
                submitFileSampleToThreatExpert(WebBrowser1, TextBox1.Text) '// Submit File(your WebBrowser used, your TextBox containing the email)
            End If
        End If
    End Sub

    Private Sub submitFileSampleToThreatExpert(ByVal selectedWebBrowser As WebBrowser, ByVal myEmail As String)
        With selectedWebBrowser.Document
            .GetElementById("FileUpload").InvokeMember("click") '// click to Upload File.
            .GetElementById("txtEmail").SetAttribute("value", myEmail) '// add your Email.
            .GetElementById("chAgreeWithTerms").SetAttribute("checked", "checked") '// check the CheckBox for Terms and Conditions.
            .GetElementById("btnSubmit").InvokeMember("click") '// click the Submit btn.
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso

See if this thread helps.
You will need 1 ListView and 1 Button in a New Project.
If you currently have a "C:\test.txt" File, delete it prior to running the code.

codeorder 197 Nearly a Posting Virtuoso

Not really sure, but I believe that "Len" is from vb6 and might cause issues in the future when used as code in vb.net.
If "Len" is length, then use RichTextBox1.Text.Length .

As for your already solved issue, see if this helps.

Dim iStartIndex, iEndIndex As Integer
        With RichTextBox1.Text
            iStartIndex = .IndexOf("sid=") + 4
            iEndIndex = .IndexOf(""">", iStartIndex)
            MsgBox(.Substring(iStartIndex, iEndIndex - iStartIndex))
        End With
AnooooPower commented: Thnx +1
codeorder 197 Nearly a Posting Virtuoso

Seems like this new issue is not caused by the code I have provided, but by code in your Public Function findlrecords() As Integer .
You can add a Try/Catch statement in your Function for the time being and start a new thread for this new issue caused by your Function.

Glad I could help otherwise.

codeorder 197 Nearly a Posting Virtuoso

Change Private iTotal As Integer to:

Private iTotal As Double

Change If Not ctl.Text = "" Then iTotal += CInt(ctl.Text) to:

If Not ctl.Text = "" Then iTotal += CDbl(ctl.Text)
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private iTotal As Integer '// used to add up the Total of all Product TextBoxes.

    '// renamed from: TxtPPproduct1_TextChanged
    Private Sub myCoolTextBoxes_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
                                Handles TxtPPproduct1.TextChanged, TxtPPproduct2.TextChanged, TxtPPproduct3.TextChanged '// add remaining TextBoxes here.
        iTotal = 0 '// reset.
        For Each ctl As Control In Me.Controls '// loop thru all controls on Form.
            If TypeOf ctl Is TextBox And ctl.Name.StartsWith("TxtPPproduct") Then '// locate TextBoxes that .Name.StartsWith...
                If Not ctl.Text = "" Then iTotal += CInt(ctl.Text) '// if not a empty value in TextBox, add to Total.
            End If
        Next
        txtTOTAL.Text = CStr(iTotal) '// Display total in your TOTAL TextBox.
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

First off, I renamed the declared Variables from "NumThis/NumThat" to be more appropriate.
I also renamed the controls as well and added code for TextBoxes to be Numeric.
3 RadioButtons(rbBadCredit, rbOkCredit, rbGoodCredit)
3 TextBoxes(txtIncomeTotal, txtHousingTotal, txtOtherTotal)
1 Button(btnSubmit)

Public Class Form1
    Private dIncomeTotal, dHousingTotal, dOtherTotal, dDebt, dMonthlyAvailableTotal, dCreditPercentage, dAnswer As Decimal

    Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        '//--- make sure TextBox values are NOT empty, else "Exit Sub" and skip the rest of the code in this Sub.
        If txtIncomeTotal.Text = "" Then : MsgBox("Please enter a Monthly Income Total.") : txtIncomeTotal.Select() : Exit Sub : End If
        If txtHousingTotal.Text = "" Then : MsgBox("Please enter a Monthly Housing Total.") : txtHousingTotal.Select() : Exit Sub : End If
        If txtOtherTotal.Text = "" Then : MsgBox("Please enter a All Other Monthly Total.") : txtOtherTotal.Select() : Exit Sub : End If
        '---------\\
        '//------ Now that you have values in all TextBoxes, you can proceed. ---------\\
        dIncomeTotal = CDec(txtIncomeTotal.Text) '// CDec ='s Convert to Decimal since .Text is a String.
        dHousingTotal = CDec(txtHousingTotal.Text)
        dOtherTotal = CDec(txtOtherTotal.Text)
        dDebt = CDec(0.36 * dIncomeTotal)
        dMonthlyAvailableTotal = dDebt - dHousingTotal - dOtherTotal
        '// Display result for Total Available Spendings.
        MsgBox(FormatCurrency(dMonthlyAvailableTotal.ToString)) '// FormatCurrency formats a # to currency format.
        '//========== most expensive car the user can buy ===============\\ 
        '//----- This part is completely wrong or the user is better off buying a bike. :D
        '((0.16 / 12), (6 * 12), 120) : $5532.03
        dAnswer = CDec((dCreditPercentage / 12) …
codeorder 197 Nearly a Posting Virtuoso

Here's something for starters to get your RadioButtons working properly.

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
                                             Handles rbBadCredit.CheckedChanged, rbOkCredit.CheckedChanged, rbGoodCredit.CheckedChanged
        If rbBadCredit.Checked = True Then
            ' I dont know what to do to put this as 23 %
        End If
        If rbOkCredit.Checked = True Then
            ' This needs to be 16% 
        End If
        If rbGoodCredit.Checked = True Then
            ' and this needs to be 10%
        End If
    End Sub

As for the rest, your entire post is a bit confusing to try and figure out where you need help at. Please supply information that a non-accountant could understand, and I will try and help.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
2 Forms: Form1(1 Button, 1 PictureBox)

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not Form2.Visible Then : Form2.Show() : Exit Sub : End If
        PictureBox1.Image = getSnapshot(Form2)
    End Sub

    Private Function getSnapshot(ByVal snapshotForm As Form) As Bitmap
        With snapshotForm
            .FormBorderStyle = Windows.Forms.FormBorderStyle.None
            Dim bmp As New Bitmap(.Width + 15, .Height + 25, Imaging.PixelFormat.Format32bppArgb)
            Dim g As Graphics = Graphics.FromImage(bmp)
            g.CopyFromScreen(New Point(.Location.X, .Location.Y), New Point(0, 0), bmp.Size)
            .FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
            Return bmp
        End With
    End Function
End Class
Public Class Form2

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.TransparencyKey = Me.BackColor : Me.TopMost = True : Me.MinimizeBox = False : Me.MaximizeBox = False
        Me.Text = "Snapshot View" : Me.Icon = SystemIcons.Information : Me.ShowInTaskbar = False
    End Sub
End Class

This will take a snapshot of Form2's Location and Size and will use Form2 as the snapshot window for your Screen Capture.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 ListView, 1 TextBox(for search value), 1 Button(to search)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not ListView1.MultiSelect = False Then ListView1.MultiSelect = False '// disable MultiSelection of items.
        If TextBox1.Text = "" Then Exit Sub '// do not search on empty search value.
        For Each itm As ListViewItem In ListView1.Items '// loop thru all items.
            If itm.Text = TextBox1.Text Then '// check if itm.Text equals search value.
                itm.Selected = True '// select item.
                itm.EnsureVisible() '// if itm is not visible in ListView, make sure it is.
                ListView1.Select() '// select the ListView to show highlighted item.
                Exit For '// exit loop since itm found.
            End If
        Next
    End Sub

Or you can change the item's.BackColor if found.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "" Then Exit Sub '// do not search on empty search value.
        For Each itm As ListViewItem In ListView1.Items '// loop thru all items.
            If itm.Text = TextBox1.Text Then '// check if itm.Text equals search value.
                itm.BackColor = Color.GreenYellow   '// change item.BackColor if found.
                itm.EnsureVisible() '// if itm is not visible in ListView, make sure it is.
            Else
                itm.BackColor = ListView1.BackColor '// change all other items BackColor to ListView.BackColor.
            End If
        Next
    End Sub
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
2 Forms (1 Button on Form1, 3 TextBoxes on Form2)

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If ListView1.SelectedItems.Count = 1 Then '// check if only 1 item is selected.
            With ListView1.SelectedItems(0) '// with Selected item.
                Form2.TextBox1.Text = .Text '// item text.
                Form2.TextBox2.Text = .SubItems(1).Text '// item column 2.Text
                Form2.TextBox3.Text = .SubItems(2).Text '// item column 3.Text
                Form2.ShowDialog()
            End With
        ElseIf ListView1.SelectedItems.Count = 0 Then '// if no item selected.
            MsgBox("Please select an item to edit.")
        ElseIf ListView1.SelectedItems.Count > 1 Then '// for "MultiSelect=True" ListViews.
            MsgBox("Please select only one item to edit.")
        End If
    End Sub
End Class
Public Class Form2
    '// save edited item back to ListView.
    Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        With Form1.ListView1.SelectedItems(0)
            .Text = TextBox1.Text : .SubItems(1).Text = TextBox2.Text : .SubItems(2).Text = TextBox3.Text
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 ListBox, 1 Button

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        getMyCoolFiles("C:\", ListBox1)
        '// getMyCoolFiles(path of the folder you want to search, the ListBox to use for adding your found files to)
    End Sub

    Private Sub getMyCoolFiles(ByVal selectedDirectoryToSearch As String, ByVal ListBoxForFoundFiles As ListBox)
        ListBoxForFoundFiles.Items.Clear()
        Dim myCoolFolder As New IO.DirectoryInfo(selectedDirectoryToSearch)
        For Each foundDirectory In myCoolFolder.GetDirectories '// loop thru all top directories.
            Try
                '// search top directory and subfolders.
                For Each myFoundFile As IO.FileInfo In foundDirectory.GetFiles("*.*", IO.SearchOption.AllDirectories)
                    ListBoxForFoundFiles.Items.Add(myFoundFile.FullName) '// add File to ListBox.
                Next
            Catch ex As UnauthorizedAccessException
                'MsgBox(ex.Message) '// display Folders that have been Denied accessed to.
            End Try
        Next
        MsgBox("Total Files: " & CInt(ListBoxForFoundFiles.Items.Count).ToString("#,###,###")) '// display Total File Count.
    End Sub
End Class
horserider commented: Thank U +1
codeorder 197 Nearly a Posting Virtuoso

Adglay Iway ouldcay elphay.:D

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
2 Forms (1 TextBox and 1 Button on Form2)

Public Class Form1
    Public myCoolPassword As String = "cool" '// your preset Password.
    Public arlMyApplicationsList As New ArrayList '// add applications to this list.
    Private myRunningProcesses() As Process
    Private WithEvents myTimer As New Timer With {.Interval = 100, .Enabled = True}

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '// add Applications to terminate if no Password.
        arlMyApplicationsList.Add("iexplore")
        arlMyApplicationsList.Add("notepad")
    End Sub

    Private Sub myTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTimer.Tick
        For i As Integer = arlMyApplicationsList.Count - 1 To 0 Step -1 '// loop backwards when removing from lists, else it will crash your app.
            killProcess(CStr(arlMyApplicationsList(i)), Form2) '// send the application and your password Form.
        Next
    End Sub

    Private Sub killProcess(ByVal selectedApplication As String, ByVal myPasswordForm As Form)
        myRunningProcesses = Process.GetProcesses '// get current Processes.
        For Each selectedProcess As Process In myRunningProcesses '// loop thru all Processes.
            If selectedProcess.ProcessName.ToLower = selectedApplication Then '// check if Process is the Process to be found.
                selectedProcess.Kill() '// terminate the Process.
                If Not myPasswordForm.Visible = True Then '// check if your password Form is Not Visible.
                    myPasswordForm.Tag = selectedApplication '// set .Tag of password Form to the application that just got terminated.
                    myPasswordForm.ShowDialog() '// load Form.
                Else
                    myPasswordForm.Tag = selectedApplication '// change .Tag in case another application was attempted to load.
                    myPasswordForm.Activate() '// Activate to set Focus to.
                End If
                Exit Sub '// since done with current Process.
            End If
        Next
    End Sub …
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private inPar, outPar As Integer '// Declared once.

    Private Sub txtP1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
                                    Handles txtP1.TextChanged, txtP2.TextChanged, txtP3.TextChanged, _
                                    txtP18.TextChanged, txtP16.TextChanged, txtP17.TextChanged '// add your other txtP# TextBoxes here.
        UpdatePar()
        txtIn.Text = CStr(inPar) : txtOut.Text = CStr(outPar) : txtTotalPar.Text = CStr(inPar + outPar)
    End Sub

    Sub UpdatePar()
        inPar = 0 : outPar = 0  '// reset.
        For hole As Integer = 1 To 18
            For Each ctl As Control In Me.Controls '// Loop thru all Controls on Form.
                '// Locate TextBox AndAlso with the proper Name AndAlso make sure it is Numeric for adding under par scores.
                If TypeOf (ctl) Is TextBox AndAlso ctl.Name = "txtP" & hole.ToString AndAlso IsNumeric(ctl.Text) Then
                    If hole <= 9 Then If Not ctl.Text = "" Then outPar += CInt(ctl.Text) '// if TextBox has a value, add.
                    If hole >= 10 Then If Not ctl.Text = "" Then inPar += CInt(ctl.Text) '// if TextBox has a value, add.
                    Exit For '// Exit the loop since TextBox was located.
                End If
            Next
        Next
    End Sub
End Class
dooleyis commented: Fast response, useful code and well explained through notes. +0
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

'// can also be located in the Control's Properties.
        ComboBox1.Sorted = True
        ListView1.Sorting = SortOrder.Ascending
        'ListView1.Sorting = SortOrder.Descending
        'ListView1.Sorting = SortOrder.None
codeorder 197 Nearly a Posting Virtuoso

Even w/the code I posted to "allow cross threading"?

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Control.CheckForIllegalCrossThreadCalls = False '// allow cross threading.
    End Sub
codeorder 197 Nearly a Posting Virtuoso

I'm not a console coder, but this should help.

Dim sInput As String = "250+1" '// value for testing.
        Dim iIndex As Integer = sInput.IndexOf("+") '// locate the "+".
        Dim iFirstNum As Integer = CInt(sInput.Substring(0, iIndex)) '// (startIndex, Length)
        Dim iSecondNum As Integer = CInt(sInput.Substring(iIndex + 1)) '// (startIndex and everything after)
        Dim sOutput As String = CStr(iFirstNum + iSecondNum)
        MsgBox("=> " & sOutput) '// Display result.
TechSupportGeek commented: Exactly what I was looking for! Problem solved! +2
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 Button, 1 ListBox, 1 BackgroundWorker

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Control.CheckForIllegalCrossThreadCalls = False '// allow cross threading.
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        BackgroundWorker1.RunWorkerAsync() '// Start BackgroundWorker.
    End Sub

    Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
        ListBox1.Items.Clear() '// clear ListBox.
        Dim myCoolFolder As String = "C:\Program Files" '// your Folder.
        Try
            For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
                                             (myCoolFolder, FileIO.SearchOption.SearchAllSubDirectories, "*.*")
                ListBox1.Items.Add(myCoolFile) '// add File with FullPath.
            Next
        Catch ex As UnauthorizedAccessException
            MsgBox(ex.Message)
        End Try
        MsgBox("Total Files: " & CInt(ListBox1.Items.Count).ToString("#,###,###"))
    End Sub
End Class
kvprajapati commented: Helpful! +12
codeorder 197 Nearly a Posting Virtuoso
FileSize = CInt(GetSize(MyFile)).ToString("#,###,###,###") & " KB"
codeorder 197 Nearly a Posting Virtuoso

Since you have not mentioned which control to add the Files to, I will also use a ListBox.

Dim myCoolFolder As String = "C:\Program Files" '// your Folder.
        Try
            For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
                                            (myCoolFolder, FileIO.SearchOption.SearchAllSubDirectories, "*.*")
                'ListBox1.Items.Add(IO.Path.GetFileName(myCoolFile)) '// add only File Name with extension.
                ListBox1.Items.Add(myCoolFile) '// add File with FullPath.
            Next
        Catch ex As UnauthorizedAccessException
            MsgBox(ex.Message)
        End Try
        MsgBox("Total Files: " & CInt(ListBox1.Items.Count).ToString("#,###,###"))

To only search the Top Folder and not the SubFolders as well, change FileIO.SearchOption.SearchAllSubDirectories to: FileIO.SearchOption.SearchTopLevelOnly

codeorder 197 Nearly a Posting Virtuoso

This: If w.Length > 1 Then will check for words that have "only" more than one characters, and this: If w.Length >= 1 Then will check for words that have one character "and more".

It was an oversight on my part, did not thoroughly test it.

codeorder 197 Nearly a Posting Virtuoso

Not really interested, but others might find it useful. Do post your solution.

codeorder 197 Nearly a Posting Virtuoso

See if this helps about recognizing which TextBox is selected.

Public Class Form1
    Private mySelectedCoolTextBox As TextBox '// used to determine which TextBox has Focus.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        mySelectedCoolTextBox.Focus() : SendKeys.Send("{BACKSPACE}") '// send the BackSpace key to your selected TextBox.
    End Sub

    Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) _
                                    Handles TextBox1.GotFocus, TextBox2.GotFocus
        mySelectedCoolTextBox = CType(sender, TextBox) '// set your selected TextBox.
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

'// Give focus to TextBox and Send the BackSpace key.
        TextBox1.Focus() : SendKeys.Send("{BACKSPACE}")

Or you can use this, which only removes the last char. unlike the SendKeys code.

With TextBox1
            If Not .Text = "" Then .Text = .Text.Substring(0, .TextLength - 1)
        End With
codeorder 197 Nearly a Posting Virtuoso

See if this helps for punctuation and one too many ProperCases:D.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strWords() As String = TextBox1.Text.Split(" "c)
        TextBox2.Clear()
        For Each w As String In strWords
            If w.Length > 1 Then '// check if word length is greater than 1.
                If Char.IsLetterOrDigit(CChar(w.Substring(w.Length - 1, 1))) Then '// check if last char. is Letter or a Number.
                    If Not TextBox2.Text = "" Then : TextBox2.Text &= " " & StrConv(translateWord(w), vbProperCase)
                    Else : TextBox2.Text = StrConv(translateWord(w), vbProperCase)
                    End If
                Else '// if NOT last char. is Letter or a Number.
                    If Not TextBox2.Text = "" Then
                        '// send only the word without the last char. to the Function and add the last char. back to the word.
                        TextBox2.Text &= " " & StrConv(translateWord(w.Substring(0, w.Length - 1)) & w.Substring(w.Length - 1, 1), vbProperCase)
                    Else
                        TextBox2.Text = StrConv(translateWord(w.Substring(0, w.Length - 1)) & w.Substring(w.Length - 1, 1), vbProperCase)
                    End If
                End If
            End If
        Next
    End Sub
End Class

I ended up using "vbProperCase" for all Function Returns, but you only need to use it for words that first letter is capitalized.
.Give it a try and reply back if you succeed or need further help.

About not knowing how to use the "ProperCase", see if this helps.

Dim sTemp As String = "check me out, i'm going to be proper cased :D"
        MsgBox(StrConv(sTemp, vbProperCase))
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 NotifyIcon, 1 ContextMenuStrip

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        NotifyIcon1.ContextMenuStrip = ContextMenuStrip1 '// attach ContextMenu to NotifyIcon.
    End Sub

    Private Sub NotifyIcon1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseClick
        If e.Button = MouseButtons.Right Then NotifyIcon1.ContextMenuStrip.Show() '// Show ContextMenu on Right Mouse click.
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Me.TextBox1.Text = CInt(myDR.GetValue(0) + 1).ToString("10000")
codeorder 197 Nearly a Posting Virtuoso

What about...

Return selectedWord.ToLower

Does not take care of the UpperCase letters, but it is a start for cleaning up.

As for the TextBox and the unknown case of the "empty space" at the beginning, check if TextBox has .Text, if not, do not add " ", else do.

For Each w As String In strWords '// loop thru all arrays.
            '// Since more than likely you will get more than one word in the TextBox, start with "If Not ='s "".
            If Not TextBox2.Text = "" Then TextBox2.Text &= " " & translateWord(w) Else TextBox2.Text = translateWord(w)
        Next

I'm quite busy for the rest of the day with beta testing software for a friend here at DaniWeb, but if you would like to check out another thread that has a String manipulation with keeping the end punctuation, check out this thread.
Let me know if that link helps, if not I'll see what I can do.

codeorder 197 Nearly a Posting Virtuoso

Glad I could help and thanks for the detailed information on how to get the consonant words sorted.

See if this helps.

Private iIndex As Integer = 0 '// used to determine where to start the .Substring if a word starts with a Consonant.

    Private Function translateWord(ByVal selectedWord As String) As String
        With selectedWord.ToLower '// use the "With" statement to shorten code.
            If .Contains("@") Then 'How do I check for other symbols?
                selectedWord = selectedWord
            ElseIf IsNumeric(selectedWord) Then  'Checks for numbers (working)
                selectedWord = selectedWord
            ElseIf .StartsWith("a") OrElse .StartsWith("e") OrElse .StartsWith("i") OrElse .StartsWith("o") OrElse .StartsWith("u") Then
                selectedWord &= "way"
            Else '// Next line checks for constants.
                iIndex = 0 '// reset.
                For Each c As Char In selectedWord '// loop thru all Characters one at a time.
                    '// check if char. is a vowel.
                    If c = "a" OrElse c = "e" OrElse c = "i" OrElse c = "o" OrElse c = "u" Then
                        '// get .Substring from location of vowel to end of string "&" add .Substring from start, with length of iIndex "&" add your "ay" to the end.
                        selectedWord = selectedWord.Substring(iIndex) & selectedWord.Substring(0, iIndex) & "ay"
                        Exit For '// Exit the loop once locating a vowel.
                    End If
                    iIndex += 1 '// increase +1 for next letter.
                Next
            End If
        End With
        Return selectedWord
    End Function

As for special char.s like "!@#$%", what do you plan to do with those?

If pig latin is for pigs and latin is for humans, then if …

codeorder 197 Nearly a Posting Virtuoso
MsgBox(Application.StartupPath & "\files\dlls\") '// use Application.StartupPath.
        MsgBox(IO.File.ReadAllText(TextBox1.Text & "test.txt")) '// for testing.

Should actually be:

MsgBox(Application.StartupPath & "\files\dlls\") '// use Application.StartupPath.
        MsgBox(IO.File.ReadAllText(Application.StartupPath & "\files\dlls\" & "test.txt")) '// for testing.

My apologies for the confusion, if any. I was using a TextBox1 for testing purposes.
The "test.txt" is a file located in the "dlls" folder.

codeorder 197 Nearly a Posting Virtuoso

Check out this thread.
It is for vbscript and not for vb.net, although it can easily be modified for vb.net.
.If you need help doing so, do let me know.