codeorder 197 Nearly a Posting Virtuoso

Unhnd_Exception, I am what "I" am, Nothing Else .

codeorder 197 Nearly a Posting Virtuoso
Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With Form2
            .TextBox1.Text = TextBox1.Text
            .Show()
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

>>there is anything you can help me with?
.quite a bit, though let me think about it since you did not start your own.thread, linked to this, and p.m.'ed the link to "your" thread to the one that Solved this thread(.Me).
(tapping air keyboard, tappy, tappy :D)
k. done thinking.

Try .Replacing line.20 with: itm = itm.Substring(itm.IndexOf(" ") + 1) '// get all text following the " ". .andAlso .Replace line.30 with: If itm.Substring(itm.IndexOf(" ") + 1) = selectedComboBox.Text Then '// locate the .Substring that matches the .Text. Basically, it looks for the " " and not the ":" as in my previously posted.code.
You might, actually "you should" add something as: If itm.Contains(" ") Then... , just to make sure your app does not crash, w/my code. Keep it real now!

Hope this helps.:)

codeorder 197 Nearly a Posting Virtuoso

..since The Sound of Music has not been Forgotten.

codeorder 197 Nearly a Posting Virtuoso

>>The code helped a lot
The "code" seems to help quite a bit more than a lot.
Glad I could help.:)
code.order

codeorder 197 Nearly a Posting Virtuoso

See if this helps.:)

Public Class Form1
    Private arCmbItems() As String = {"item 1", "item 2", "item etc.", "item.Else"}

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        With ListBox1
            .Items.AddRange(arCmbItems) '// add items to ListBox from String.Array.
        End With
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        With ListBox2.Items
            If Not ListBox1.SelectedIndex = -1 Then '// check if item is selected since Index.of -1 is No.Item.Selected.
                .Clear() '// .Clear for new input.
                Select Case ListBox1.SelectedItem '// check value selected.
                    Case arCmbItems(0) '// case 1st.item.
                        .Add("1a") : .Add("1b") : .Add("1c")
                    Case arCmbItems(2) '// case 3rd.item.
                        .Add("etc.a") : .Add("etc.b") : .Add("etc.c")
                    Case arCmbItems(1) '// case 2nd.item.
                        .Add("2a") : .Add("2b") : .Add("2c")
                    Case Else '// if any other item selected.
                        .Add("No items")
                        .Add("in String.Array")
                        .Add("for this .SelectedItem")
                End Select
            End If
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

What will/do I have to offer someone that has never lived?

codeorder 197 Nearly a Posting Virtuoso

#Region is to be able to collapse an entire "region" of code and minimize the area of your code window. Your little trigger happy finger should be happy to Not have to scroll as much also.

codeorder 197 Nearly a Posting Virtuoso

>>I have 1 rich text box that the data gets displayed in.
That's what I was looking for, thanx.:)

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

    Private Sub Button1_Click_1(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        myCoolSaveSub(myNamesFile, RichTextBox1)
    End Sub

#Region "-----===-----===-----===  ===-----===-----===-----"
    Private Sub myCoolSaveSub(ByVal selCoolFile As String, selCoolRichTextBox As RichTextBox)
        File.WriteAllLines(selCoolFile, selCoolRichTextBox.Lines)
        MsgBox("file.saved.")
    End Sub
#End Region
End Class
codeorder 197 Nearly a Posting Virtuoso

A life without love for the heart, is a heartless life.

codeorder 197 Nearly a Posting Virtuoso

>>Now Chill
NO! What are you going to do about it? xD
(jk)
.was not a fight, was understanding each other's.solid terms, Nothing Else.
.thanx for concern, +=1 for you as well.:)

codeorder 197 Nearly a Posting Virtuoso

With one life to live, I shall live a short life.

codeorder 197 Nearly a Posting Virtuoso

invisial+=1.4u

codeorder 197 Nearly a Posting Virtuoso

.quite interesting invisial.
I'll stick to .My idea on the topic that Nothing clears out the memory of certain/If Not all things(:mostly due to being a hobbyist programmer/etc.:), and hopefully someday someone will read this thread and actually do something about it; as to clearing out those unnecessary characters out of someone's memory..
.Afterall, think big, and big things might happen; it is God's world after all(says quite a few folk, more than 90%+ of the world's population.
.andAlso, nope, not bringing religion to the table, for I have faith in life, not God.

codeorder 197 Nearly a Posting Virtuoso

invisal, some good info provided, thanx, though...
I believe that when you clear a Variable to Nothing, especially a String, it sets the .Value to "";which contains "no" characters at all.
By doing so, you should clear the memory just a little, even if only by a few characters here and there.

I did mention<<Not sure if this helps
.and I was and still am quite uncertain that it does help to clear To Nothing, though it seems like it should; just from those few little characters not using up memory, If Not needed.

codeorder 197 Nearly a Posting Virtuoso

>>where does that code save the file to?
Private myNamesFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\myNamesFile.txt"
>>What are the 3 text boxes for?
I used them as an example to write content back to the file.
.reason was: I had no idea other than >>i have a prompt that allows me to enter the number of names and the names themselves.
.thus I used TextBoxes.

If you specify on how and what controls contain those "names" for you to save/load the names to/from, then I will have a better understanding towards supplying a possible solution.
>>im sorry if i seem naggy or rude about this
.never even crossed my mind.:)

codeorder 197 Nearly a Posting Virtuoso

Not sure if this helps, though I did notice it in an online.thread a while ago and it has been w/.Me ever since; in mind, Not programming(for now at least).

Public Class Form1
    Private sTemp As String
   
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        sTemp = "some textString"
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        MsgBox(sTemp) '// get.Value.
        '////////////////
        sTemp = Nothing '// .Clear String once value has been used.
        '\\\\\\\\\\\\\\\\\\\
    End Sub
End Class

I think that by .Clearing out the Values to Nothing, might clear up the system one way or another. Again, assumption, though I like.:)

codeorder 197 Nearly a Posting Virtuoso

This thread is solved and no solution? :(

codeorder 197 Nearly a Posting Virtuoso

Breaking the rules every now and then is mostly.done in good intention and should not be something worth having to Investigate.

Nothing

codeorder 197 Nearly a Posting Virtuoso

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

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

.actually, see If this helps w/saving.

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

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        myCoolSaveSub()
    End Sub
    Private Sub myCoolSaveSub()
        arFileLines = New String() {TextBox1.Text, TextBox2.Text, TextBox3.Text}
        File.WriteAllLines(myNamesFile, arFileLines)
        MsgBox("file.saved.")
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        myCoolSub()
    End Sub
    Private Sub myCoolSub()
        If File.Exists(myNamesFile) Then
            arFileLines = File.ReadAllLines(myNamesFile)
            MsgBox(arFileLines(1)) '// get line.2 from File.
        End If
    End Sub

>>how would i write a Private Sub to save the info in the array?
.save to.file? or just add values to the Array? andAlso from where/what controls?

codeorder 197 Nearly a Posting Virtuoso

See if this helps to load.File into Array.

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

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If File.Exists(myNamesFile) Then
            arFileLines = File.ReadAllLines(myNamesFile)
            MsgBox(arFileLines(1)) '// get line.2 from File.
        End If
    End Sub
End Class

.make sure you have at least 2 lines in your myNamesFile .

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private sNBSP As String = "&nbsp;"
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        With TextBox1
            .Text = "T" & sNBSP & "E" & sNBSP & "S" & sNBSP & "T"
        End With
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With TextBox1
            If .Text.Contains(sNBSP) Then .Text = .Text.Replace(sNBSP, "")
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Is there a reason Not to be <b> when .bold isNot at question?

codeorder 197 Nearly a Posting Virtuoso

Do I believe as you do or do I not believe at all, for I am nothing in your eyes.

codeorder 197 Nearly a Posting Virtuoso

Why do I Not cry If I never smile?

codeorder 197 Nearly a Posting Virtuoso

.hmm.
If you can, attach the project in a .zip file.

codeorder 197 Nearly a Posting Virtuoso

.a bit.confusing, though, see if this helps?.

Public Class Form1
    Private myCoolFont1 As New Font("verdana", 23, FontStyle.Bold), myCoolFont2 As New Font("georgia", 33, FontStyle.Italic)
    Private isFont1 As Boolean = False '// Toggles Font.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        With RichTextBox1
            If isFont1 Then
                .SelectionFont = myCoolFont2
                isFont1 = False
            ElseIf Not isFont1 Then
                .SelectionFont = myCoolFont1
                isFont1 = True
            End If
        End With
    End Sub

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        With RichTextBox1 : .HideSelection = False : End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

.am Not a db(database).coder, though see if this helps andAlso this.:)

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private xnL As String = vbNewLine
    Private myCoolFont1 As New Font("verdana", 23, FontStyle.Bold), myCoolFont2 As New Font("georgia", 33, FontStyle.Italic)

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With RichTextBox1 : .Text &= "line 1" & xnL & "line 2" & xnL & "line 3" : .HideSelection = False : End With
    End Sub
  
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        With RichTextBox1 : setFont(RichTextBox1, 0, myCoolFont1) : setFont(RichTextBox1, 1, myCoolFont2) : End With
    End Sub
    Private Sub setFont(ByVal selRtb As RichTextBox, ByVal selLine As Integer, ByVal selFont As Font)
        With selRtb
            If .Lines.Length >= selLine Then : Dim iStartIndex As Integer = 0
                For i As Integer = 0 To selLine - 1 : iStartIndex += .Lines(i).Length + 1 : Next
                .Select(iStartIndex, .Lines(selLine).Length) : .SelectionFont = selFont
            End If
        End With
    End Sub
End Class

p.s.am a lil' too busy to add a few comments, though this helped to possibly help you.
http://www.vbforums.com/showpost.php?p=3355847&postcount=3

codeorder 197 Nearly a Posting Virtuoso

Try in new project.
If it works, Then it works and you have to figure out how to insert the posted solution/suggestion into your project, Not.Me; since that was not part of this thread's question. Good luck.:)

codeorder 197 Nearly a Posting Virtuoso

Then, AndAlso, read your rep.comment.
Hope it helps to get you a solution quicker, and not waste the world's time w/nonsense.
Nothing personal, might help others in the future as well.:)

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

>>I have a listview wherein when I double click a student another form pops up where i edit the student info.
ListView for all.Students on Form1, TextBoxes for .Edit .SelectedStudent.Info on Form2.

codeorder 197 Nearly a Posting Virtuoso

>>Anyway, i'll try the code.
If you're gonna try someone, don't try .Me cause I'll knock more than teeth out of a pillow. :D
.sorry, morning here, no coffee yet.:(
"code".order

codeorder 197 Nearly a Posting Virtuoso

.a bit.confusing, though somewhat I have an idea.
To clear this up for me and possibly others, do you want to type in rtb(RichTextBox) and Then change font after?.orElse do you want to always have line.1 w/(any font, size 72, bold) and line.2 w/(any font, size 48, Italic)? orElse btn.Click to change font for those 2lines only?

codeorder 197 Nearly a Posting Virtuoso

.see If this helps.

Public Class Form1

    Private Sub ListView1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListView1.SelectedIndexChanged
        With ListView1
            If Not .SelectedItems.Count = 0 Then
                With .SelectedItems(0) '// first selected.item.
                    Form2.TextBox1.Text = .Text
                    Form2.TextBox2.Text = .SubItems(1).Text
                    Form2.ShowDialog()
                End With
            End If
        End With
    End Sub
End Class
Public Class Form2

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With Form1.ListView1
            If Not .SelectedItems.Count = 0 Then
                With .SelectedItems(0) '// first selected.item.
                    .Text = TextBox1.Text
                    .SubItems(1).Text = TextBox2.Text
                    Me.Close()
                End With
            End If
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps, 2Buttons.needed.

Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        With Button1 : .Text = ".open" : End With : With Button2 : .Text = ".fileName" : .Width += 123 : End With '// FOR TESTING.
    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.ToString) '// check if it has a .FullPath and load in/as default.
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

...and on dirt, which Not covers Earth.

codeorder 197 Nearly a Posting Virtuoso

>>@codeorder, if im allowed i would suggest...
.suggest as you may, I'm still trying to crack this s.o.b. out; tough cookie though.:)
Do post a sample.code that might help to a better solution. Return "thanx" .

codeorder 197 Nearly a Posting Virtuoso

.thanx for p.m. w/link to thread; will try to figure out a better way to sort.items and reply; though in the mean.while, I hope that others will try to provide possible solutions since those always seem to help for such threads as this.:)

codeorder 197 Nearly a Posting Virtuoso

>>What can be wrong?
See if this helps.:)

Try
        Do you actually have a question?
        .no.Error here
        msgbox("web.waste.it")
        End Try
codeorder 197 Nearly a Posting Virtuoso

ng5, start your own thread and Flag.Post your own dumb.a.ss after.:D

send me p.m. w/link to thread.after, I might be able to help.:)

codeorder 197 Nearly a Posting Virtuoso

Regarding:
>>As for the date question, all I do is
What about the Format of the Date?
For.example: Format = "mm/[B]dd[/B]/yyyy" and you have a Date.FileLine.Read as 01/02/2003 and your .app might mistake the Format as "[B]dd[/B]/mm/yyyy" ?

Thanks for previous input and glad I could be of help. :)

codeorder 197 Nearly a Posting Virtuoso

Thanks for the att.File, though I do not run uploaded.exe Files; especially If Not from a trusted.download sight as Download.com.
<<My.Apologies?
...again?

If you have any questions that you think I might be able to answer, do notify me.
As for me wasting My.time and getting nowhere, again, not hapenning "again". Good luck w/this thread, I am out of here.

codeorder 197 Nearly a Posting Virtuoso

>>Dude it works
>>I just dont understand how it works ????
<<How exactly does this "work" w/your most recent posted.code, since I get no results from it?

codeorder 197 Nearly a Posting Virtuoso

No man its okay
Okay so Ive got it working but the Example very advanced
or doesnt really make much sense

For Each proc In Form3.ListBox2.Items
                Dim ppdd() As Process = System.Diagnostics.Process.GetProcessesByName(proc.ToString.ToLower.Split(".")(0))
                For Each p As Process In ppdd
                    p.Kill()
                Next
            Next

How exactly does this "work" w/your most recent posted.code, since I get no results from it?Not even a MsgBox instead of .Kill.

codeorder 197 Nearly a Posting Virtuoso

I've been out all day, really tired, though I still noticed that you have not posted the code that loads the .Processes into your ListBox?

Since that was too much of a difficult task for you to do, even after 100+attempts of posting:D, why not just post one or 2 of the ListBox.Items(Processes) in your next post.

I mostly need to see how they are loaded into your ListBox, If FullPath, ElseIf only FileName, etc.. This because I am also a bit confused on how you can .Split by the "." and still get a For/Next loop out of one .Item(Process?).