codeorder 197 Nearly a Posting Virtuoso
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        Select Case e.KeyChar
            Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", vbBack '// numeric and backspace.
                Exit Sub
            Case Else
                e.Handled = True
        End Select
    End Sub

Should work.
Using shortcut keys to Cut, Copy, Paste does not.

xfrolox commented: Good and easy +1
codeorder 197 Nearly a Posting Virtuoso

Question: How can I get my Windows Form for the players names to load when the application is started, do I use a form load event???

You can always add a new Form, go to Project/"your application" Properties..., Application Tab, and locate the "Startup form:" option.

Or just use the Form_Load event for the Startup Form.:)

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Form2.ShowDialog()
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

If unsure of what .Net Framework you application was created for use in, locate vb.net File menu/ Project/"your application" Properties...
Click the compile tab and very last option "Advanced Compile Options...", which should show the .Net Framework your application needs in order to function.

If unsure of what .Net Framework the other p.c. that resulted your setup file in an error, paste the following JavaScript code in the address bar of Internet Explorer on their p.c.

javascript:alert(navigator.userAgent)

An alert should display some information.
Locate all the .Net sections, which should display all of the .Net Frameworks installed on that p.c.
Attached is a image of what displays on my p.c. with the Frameworks I currently have available to run application with.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Private Sub Panel1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.MouseHover
        If Panel1.Height = 200 Then Exit Sub
        For i As Integer = 100 To 200 Step 1
            Panel1.Height = i
        Next
    End Sub
    Private Sub Panel1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.MouseLeave
        If Panel1.Height = 100 Then Exit Sub
        For i As Integer = 200 To 100 Step -1
            Panel1.Height = i
        Next
    End Sub
codeorder 197 Nearly a Posting Virtuoso
Dim myDataString As String = "0-AGF-MYR-100101"
        Dim myArray() As String = myDataString.Split("-") '// separate each item.
        For i As Integer = 0 To myArray.Length - 1 '// loop thru myArray.
            '// code to add datatable column here.
            MsgBox(myArray(i)) '// display result.
            '//
        Next
codeorder 197 Nearly a Posting Virtuoso

:)
Just tunning up my sport car to test it in your county.:D

codeorder 197 Nearly a Posting Virtuoso

I ended up downloading the project file and am currently overlooking the Daily Log Form.
You may delete the project from your website if preferred.

I do appreciate the concern about downloading strange files/projects since I do feel the same way. However, I did scan with AVG, both the zip and unzipped folder, and looks promising. If I cannot trust anything, I probably would not trust myself, not AVG. :D

I will send a private message when done overlooking the code.
Nice website btw.:)

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '// create and customize.
        Dim myCoolTextBox As New TextBox
        myCoolTextBox.Text = "my new textbox."
        myCoolTextBox.Multiline = True
        myCoolTextBox.ScrollBars = ScrollBars.Vertical
        myCoolTextBox.Size = New Size(200, 500)
        '// add to form.
        Me.Controls.Add(myCoolTextBox)
    End Sub
codeorder 197 Nearly a Posting Virtuoso

This code sample will add appropriate Events for each textbox defined and also add the "Start" time for a new row and "End" time for the current row.

Public Class Form1

    Dim activeCtl As TextBox '// control that is currently in focus.

    Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
        If e.KeyCode = Keys.F1 Then
            Dim tempStr As String = TimeOfDay
            tempStr = tempStr.Substring(0, tempStr.Length - 6) '// get only hours and minutes.

            If activeCtl.Name.StartsWith("Start") Then
                activeCtl.Text = tempStr '// add Start time.
                Exit Sub '// skip remaining code.
            End If

            '// add "Start" time for next line of textboxes and add "End" time for the current line of textboxes.
            If activeCtl.Name.StartsWith("Case") AndAlso activeCtl.Tag = "enter Key pressed." Then
                Dim ctlNumber As String = activeCtl.Name.Substring(4, activeCtl.Name.Length - 4) '// get number of textbox.
                For Each ctlStart As Control In TabControl1.TabPages(0).Controls '// loop thru controls.
                    If TypeOf (ctlStart) Is TextBox And ctlStart.Name = "Start" & ctlNumber + 1 Then '// if textbox and next in line.
                        ctlStart.Text = tempStr '// add "Start" time.
                        For Each ctlEnd As Control In TabControl1.TabPages(0).Controls '// loop thru controls to locate the preceeding End time.
                            If TypeOf (ctlEnd) Is TextBox And ctlEnd.Name = "End" & ctlNumber Then ctlEnd.Text = tempStr '// add "End" time.
                            Exit For '// end loop.
                        Next
                        Exit For '// end loop.
                    End If
                Next
            End If
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.KeyPreview = True '// important …
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

'// Prerequisites: 3 TextBoxes.
'// TextBox1 = current start time, TextBox2 = case number, TextBox3 = current time in the start box on the next row
Public Class Form1

    Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
        If e.KeyCode = Keys.F1 Then
            Dim tempStr As String = TimeOfDay
            tempStr = tempStr.Substring(0, tempStr.Length - 6) '// get only hours and minutes.
            If TextBox1.Focused Then TextBox1.Text = tempStr
            If TextBox2.Focused AndAlso TextBox2.Tag = "enter Key pressed." Then TextBox3.Text = tempStr
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.KeyPreview = True '// important when using keys pressed and having other controls on the Form.
    End Sub

    Private Sub TextBox2_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyUp
        If e.KeyCode = Keys.Enter Then
            TextBox2.Tag = "enter Key pressed." '// set the tag to some value.
        End If
    End Sub

    Private Sub TextBox3_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.LostFocus
        TextBox2.Tag = "" '// reset tag if lost focus.
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

'// Prerequisites: 1 Label, 3 PictureBoxes.
Public Class Form1

    Private myClickCounter As Integer = 1
    Private myCursorLocation As Point

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Visible = False
    End Sub

    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
        Handles PictureBox1.Click, PictureBox2.Click, PictureBox3.Click
        Select Case sender.name
            Case "PictureBox1"
                Select Case myClickCounter
                    Case 1 : Label1.Text = sender.name & " clicked 1 time."
                        myClickCounter += 1
                    Case 2 : Label1.Text = sender.name & " clicked 2 times."
                        myClickCounter = 1
                End Select
            Case "PictureBox2"
                Select Case myClickCounter
                    Case 1 : Label1.Text = sender.name & " clicked 1 time."
                        myClickCounter += 1
                    Case 2 : Label1.Text = sender.name & " clicked 2 times."
                        myClickCounter = 1
                End Select
            Case "PictureBox3"
                Select Case myClickCounter
                    Case 1 : Label1.Text = sender.name & " clicked 1 time."
                        myClickCounter += 1
                    Case 2 : Label1.Text = sender.name & " clicked 2 times."
                        myClickCounter = 1
                End Select
        End Select
    End Sub

    Private Sub PictureBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) _
        Handles PictureBox1.MouseEnter, PictureBox2.MouseEnter, PictureBox3.MouseEnter
        Label1.Visible = True
        PictureBox1_Click(sender, e) '// if you want to reset the clicks.
        Label1.Location = New Point(myCursorLocation.X + 5, myCursorLocation.Y + 5) '// offset label.
    End Sub

    Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) _
        Handles PictureBox1.MouseLeave, PictureBox2.MouseLeave, PictureBox3.MouseLeave
        Label1.Visible = False
        myClickCounter = 1
    End Sub

    Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
        myCursorLocation = e.Location
    End Sub …
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
Prerequisites: 1 ListView, 1 Button.

Public Class Form1

    Private myCoolFile As String = "C:\test.txt" '// your file.

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        Dim myWriter As New IO.StreamWriter(myCoolFile)
        For Each myItem As ListViewItem In ListView1.Items
            myWriter.WriteLine(myItem.Text & "#" & myItem.SubItems(1).Text) '// write Item and SubItem.
        Next
        myWriter.Close()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListView1.View = View.Details : ListView1.Columns.Add("column 1") : ListView1.Columns.Add("column 2")

        If IO.File.Exists(myCoolFile) Then '// check if file exists.
            Dim myCoolFileLines() As String = IO.File.ReadAllLines(myCoolFile) '// load your file as a string array.
            For Each line As String In myCoolFileLines '// loop thru array list.
                Dim lineArray() As String = line.Split("#") '// separate by "#" character.
                Dim newItem As New ListViewItem(lineArray(0)) '// add text Item.
                newItem.SubItems.Add(lineArray(1)) '// add SubItem.
                ListView1.Items.Add(newItem) '// add Item to ListView.
            Next
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Static i As Integer = 0
        Dim newItem As New ListViewItem("item " & i) '// add text Item.
        newItem.SubItems.Add("subitem " & i) '// add SubItem.
        ListView1.Items.Add(newItem) '// add Item to ListView.
        i += 1
    End Sub
End Class
killerbeat commented: Great Snipped, thanks +1
codeorder 197 Nearly a Posting Virtuoso

... The count also needs to stay in the 0000 format. ie; 0001, 0002, all the way up to 9999....

I must have missed this part.:'(

Replace the last code line in Timer1_Tick() from:

Me.Text = intCounter & " - Interval Speed: " & Timer1.Interval

To:

Me.Text = intCounter.ToString("#000#") & " // Interval Speed: " & Timer1.Interval

:)

codeorder 197 Nearly a Posting Virtuoso
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
        Select Case TabControl1.SelectedIndex
            Case 0
                MsgBox("Tab 1 Activated.")
            Case 1
                MsgBox("Tab 2 Activated.")
        End Select
    End Sub
codeorder 197 Nearly a Posting Virtuoso

Prerequisites: 1 Timer, 2 Buttons, 1 NumericUpDown.

Public Class Form1

    Private myCount As String = "positive count"
    Private intCounter As Integer = 0

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Button1.Text = "Start" : Button2.Text = "Positive"
        Me.Text = "0"
        NumericUpDown1.Minimum = 1
        NumericUpDown1.Maximum = 13
        Timer1.Interval = 50
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Button1.Text = "Start" Then
            Button1.Text = "Stop" : Timer1.Start()
        Else
            Button1.Text = "Start" : Timer1.Stop()
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If Button2.Text = "Positive" Then
            Button2.Text = "Negative" : myCount = "negative count"
        Else
            Button2.Text = "Positive" : myCount = "positive count"
        End If
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If myCount = "positive count" Then intCounter += 1
        If myCount = "negative count" Then intCounter -= 1
        Me.Text = intCounter & " - Interval Speed: " & Timer1.Interval
    End Sub

    Private Sub NumericUpDown1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged
        Timer1.Interval = NumericUpDown1.Value * 100 / 2 '// just a random equation for project testing.

        '// or you can use a select case.

        'Select Case NumericUpDown1.Value
        '    Case 1
        '        Timer1.Interval = 50
        '    Case 2
        '        Timer1.Interval = 100
        '    Case 3
        '        Timer1.Interval = 150
        '        '// etc.
        'End Select

    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Creating your own custom Message Box is probably the only way to add an image to it.

Check out this link and locate Custom Message Boxes.
http://visualbasicnet.weebly.com/message-boxes.html

codeorder 197 Nearly a Posting Virtuoso

I have just retested the sample project and it looks like It causes a slight error when targeting a .Net Framework less than 3.5.
This line of code,

For i As Integer = 0 To myCoolFileLines.Count - 1 '// for each array.

should actually be.

For i As Integer = 0 To myCoolFileLines.Length - 1 '// for each array.
codeorder 197 Nearly a Posting Virtuoso
codeorder 197 Nearly a Posting Virtuoso

If the file is exactly as you posted and each line does not have any extra spaces added to the end of the line, the project should respond as asked.

Copy and Paste the entire source code in a new Project.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '// customize Form.
        Me.Size = New Size(415, 300) : Me.Icon = SystemIcons.Information : Me.MaximizeBox = False
        '// create and customize a ListView.
        Dim myListView As New ListView With {.Location = New Point(0, 0), .Dock = DockStyle.Fill, .View = View.Details, _
                                                             .FullRowSelect = True, .Font = New Font("Verdana", 10)}
        With myListView.Columns '// (column name, column width, column alignment)
            .Add("Rank", 45, HorizontalAlignment.Center) : .Add("Team", 150) : .Add("Won", 45, HorizontalAlignment.Center)
            .Add("Lost", 45, HorizontalAlignment.Center) : .Add("Percentage", 90, HorizontalAlignment.Center)
        End With
        '// add ListView to Form.
        Me.Controls.Add(myListView)

        Dim sortArray As New ArrayList '// array list to store modified strings (file lines).
        Dim tempString As String = String.Empty  '// string for modifying array strings.
        Dim myCoolFile As String = "C:\test.txt" '// your file.

        If IO.File.Exists(myCoolFile) Then '// check if file exists.
            Dim myCoolFileLines() As String = IO.File.ReadAllLines(myCoolFile) '// load your file lines as string arrays.
            For i As Integer = 0 To myCoolFileLines.Count - 1 '// for each array.
                Dim myArray() As String = myCoolFileLines(i).Split(" ") '// separate each line into arrays by space.
                If myArray.Length = 4 Then '// if array contains a City with 2 words.
                    tempString = myArray(2) & "#" '// add games won.
                    tempString …
codeorder 197 Nearly a Posting Virtuoso

It has to do something with the way your code is setup.

You can post your code here for the 2 Forms OR if you want to keep it confidential you can send the code to me in a private message.

codeorder 197 Nearly a Posting Virtuoso

hi,
i have tried your code but its still accept more than 10 records...

I seriously doubt that.

About your code, try it in a new project.

Public Class Form1
    '// Pre-requisites: 1 ListView, 1 Button.
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListView1.View = View.List
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim nTotlistrec As Integer = ListView1.Items.Count
        If nTotlistrec < 10 Then '// check if less than 10.
            ListView1.Items.Add("new item" & ListView1.Items.Count + 1)
        Else
            MsgBox("you can only pay 10 bills per transaction")
        End If
    End Sub
End Class

You had <= instead of just <, which would add an extra item.

codeorder 197 Nearly a Posting Virtuoso

Just to create or overwrite a .txt file, try the following code.

Button1.Visible = False
        Button2.Visible = False
        Label5.Visible = False
        '/////////////////////////////
        Dim myCoolFile As String = "C:\myCoolTestFile.txt" '// your file location.
        IO.File.WriteAllText(myCoolFile, TextBox1.Text & " / " & MaskedTextBox1.Text) '// save to file.
        '/////////////////////////////
        '// display confirmation AFTER saving the file.
        Label3.Text = "Your information has been saved."
        Label4.Text = ""
eikal commented: Great thanks +1
codeorder 197 Nearly a Posting Virtuoso
If Not ListView1.Items.Count = 10 Then
            ListView1.Items.Add("new item")
        End If
codeorder 197 Nearly a Posting Virtuoso
Dim myCoolBirthday As Date = DateTimePicker1.Value.Date '// selected value from DateTimePicker.
        Dim currentDate As Date = Today '// value of current date.
        Dim myAge As Integer = currentDate.Year - myCoolBirthday.Year '// subtract years from current date.
        MsgBox("My age: " & myAge & vbNewLine & "Just don't tell anyone. :)") '// display age.
codeorder 197 Nearly a Posting Virtuoso

Add a ToolStrip from the Toolbox, right click it, and select "Insert Standard Items". (see attached image)
The standard icons are very limited, so online icon websites can become second nature towards locating the proper icons for your application.

Here is a link for a few Toolbar Icons.
The entire website for www.iconarchive.com is quite impressive, although most, if not all icons require to comply with the terms of the license.
Example:
License: Linkware
Commercial usage: Allowed

A simple web search for application icons is also quite useful as long as you comply with the terms for each website.
This is mostly when designing commercial not personal applications.

A personal note.
When adding icons/images to buttons that are small in size, re-size the icons/images to fit the buttons properly. This will cause the icons/images not to be distorted.

codeorder 197 Nearly a Posting Virtuoso

Hi,
Dim Var as Double
Var = TabControl1.Textbox1.text
Please help !!

Dim Var As Double
        Var = TextBox1.Text

TextBox1 should do just fine. :)

codeorder 197 Nearly a Posting Virtuoso

You can also use the (ApplicationSettings) located in a control's Properties.

For example, Label1:
Double-click or click the little arrow for (ApplicationSettings), which should be located at the very top of the Label1 Properties.
Locate Text, click the litte arrow and select (New...).
Give it a unique Name,press OK, and Done.:)

Run your application, change text for Label1 and restart your application. The text should have been restored as previously left.

You can also select different options to save from selecting the (PropertyBinding).

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Dim myCoolFileLines() As String = IO.File.ReadAllLines("C:\config.ini") '// load your file as a string array.
        Dim array() As String = {""}
        '// go thru each line.
        For Each rLine As String In myCoolFileLines
            array = rLine.Split("=")
            For i As Integer = 0 To array.Length - 1
                MsgBox(array(i))
            Next
        Next

        '// get a single line.
        array = myCoolFileLines(1).Split("=") '// line 2.
        MsgBox(array(0))
        MsgBox(array(1))
codeorder 197 Nearly a Posting Virtuoso
Imports System.IO

Public Class Form1

    Private file_name As String = "jpeg.rtf"
    Private tempString As String = Date.Now

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '/////////////////////////////
        tempString = tempString.Replace("/", "-")
        '// unless you replace these character, the file name returns invalid and causes errors.
        tempString = tempString.Replace(":", ".")
        '////////////////////////////
        Dim path1 As String = Trim("D:\frs\files\" & file_name)
        Dim path2 As String = Trim("D:\frs\versions\" & tempString & " " & file_name) '// modified.
        File.Copy(path1, path2)
        MsgBox("File copied to:" & vbNewLine & path2)
        End
    End Sub
End Class

As mentioned, you are trying to create a file with invalid characters for the file name.
Also, you are trying to copy the file to a folder that does not exist so I modified the code in path2.

One more thing, your declared variable "Now" might conflict with the vb.net code for Now.
Try using something that does not cause/or could cause conflicts.

Hope this helps.

guptas commented: Very accurate reply. +1
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1

    '// your application's folder that contains all Forms.
    Private myAppFolder As String = "C:\Users\codeorder\Desktop\vb.net\WindowsApplication1\WindowsApplication1"

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim myCoolFileLineCount As Integer = 0
        For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
                                      (myAppFolder, FileIO.SearchOption.SearchTopLevelOnly, "*.*") '// scan folder.
            If IO.Path.GetExtension(myCoolFile) = ".vb" Then '// get all files with the .vb file extension.
                If Not IO.Path.GetFileName(myCoolFile).Contains(".Designer.vb") Then '// remove files that are Designer files.
                    Dim myCoolForm As String = IO.Path.GetFullPath(myCoolFile) '// get full path of file.
                    Dim myCoolFileLines() As String = IO.File.ReadAllLines(myCoolForm) '// load your file as a string array.
                    myCoolFileLineCount += myCoolFileLines.Length '// count lines and add to the sum total.
                End If
            End If
        Next
        '// display your application's total code line count.
        MsgBox(Application.ProductName & vbNewLine & "Total Code Lines Count: " & myCoolFileLineCount, MsgBoxStyle.Information)
    End Sub

End Class

Please supply the proper information when FIRST asking a question.
Thank you.

Simran Kaur commented: was helpful +1
codeorder 197 Nearly a Posting Virtuoso

Add this to your code.

Dim iconBitmap As Bitmap = New Bitmap(favicon)
            Me.Icon = Icon.FromHandle(iconBitmap.GetHicon)
codeorder 197 Nearly a Posting Virtuoso
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        WebBrowser1.Navigate("http://www.ritani.com/salespersons/login")
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

        If WebBrowser1.Url.AbsoluteUri = "http://www.ritani.com/salespersons/login" Then
            WebBrowser1.Document.GetElementById("SalespersonEmail").SetAttribute("Value", "myCoolEmail@myCoolWebsite.com")
            WebBrowser1.Document.GetElementById("SalespersonPassword").SetAttribute("Value", "myCoolPassword")
            WebBrowser1.Document.Forms(1).InvokeMember("submit")
        End If

    End Sub

You might find this link useful.

codeorder 197 Nearly a Posting Virtuoso

Quite possible.
I will send you a private message on how to get started since it could get a little more complicated than just having one timer and we do not want to send forum threads off-topic.:)

codeorder 197 Nearly a Posting Virtuoso
'// 1 tabcontrol, 3 textboxes on tabpage 2

       '// TabPages is index based, 0 = tabpage1, 1 = tabpage2, etc.
        MsgBox(TabControl1.TabPages(1).Controls(2).Text) '// will get the first added textbox's text .
        '//changing 2 to 0 will get the last control added to the tabpage.
codeorder 197 Nearly a Posting Virtuoso

The previously posted code only gets a preselected indexed item.

The following code will get every item's text that has been clicked.

Private Sub ToolStripDropDownButton1_DropDownItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStripDropDownButton1.DropDownItemClicked
        '/////////////////////
        MsgBox(e.ClickedItem.Text)
        '////////////////////
    End Sub
codeorder 197 Nearly a Posting Virtuoso
Private Sub ToolStripDropDownButton1_DropDownItemClicked(ByVal sender As Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStripDropDownButton1.DropDownItemClicked
        Dim myCoolFile As String = ToolStripDropDownButton1.DropDownItems.Item(0).Text
        MsgBox(myCoolFile)
    End Sub
codeorder 197 Nearly a Posting Virtuoso
codeorder 197 Nearly a Posting Virtuoso

What is wrong with the code from your other thread "Drag and drop"?

codeorder 197 Nearly a Posting Virtuoso

:yawn:

codeorder 197 Nearly a Posting Virtuoso
Dim myCoolMsgBox As DialogResult '// declare a message box.
        myCoolMsgBox = MessageBox.Show("Nickname?", Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question)

        Select Case myCoolMsgBox
            Case DialogResult.Yes
                MsgBox("You pressed Yes.")
            Case DialogResult.No
                MsgBox("You pressed No.")
        End Select
codeorder 197 Nearly a Posting Virtuoso

First, your If statement needs a closing End If statement.

If TextBox2.Text = "1" Then
            TextBox2.BackColor = Color.LawnGreen
            'C:\Users\Nick\Desktop\good_work.play
        End If

Second, you cannot just paste a file's full path, especially one without a file extension and expect nothing but errors.
You have to declare it.

Dim myCoolFile As String = "C:\Users\Nick\Desktop\good_work.wav"

And finally, check out this thread.
How do I make a program in VB make a sound when it starts?

codeorder 197 Nearly a Posting Virtuoso

Try the following code as a new project.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With ListView1
            .Columns.Add("New Column", .Width - 21)
            .CheckBoxes = True : .FullRowSelect = True : .View = View.Details
            .Items.Add("item 1") : .Items.Add("item 2") : .Items.Add("item 3") : .Items.Add("item 4") : .Items.Add("item 5")
            .Items.Add("item 6") : .Items.Add("item 7") : .Items.Add("item 8") : .Items.Add("item 9") : .Items.Add("item 10")
        End With
    End Sub

    Private Sub ListView1_ItemChecked(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckedEventArgs) _
                                                    Handles ListView1.ItemChecked
        ListBox1.Items.Clear()
        For Each itemListed As ListViewItem In ListView1.Items
            If itemListed.Checked = True Then
                ListBox1.Items.Add(itemListed.Text)
            Else
                ListBox1.Items.Remove(itemListed.Text)
            End If
        Next
    End Sub
End Class

The code only allows the Checked Items to be added to the Listbox, nothing else.
Even my previous reply, tested in a new project from a Button_Click event, returned the same result.

It could be that somewhere in your code you are adding all items to the Listbox, checked or unchecked.

codeorder 197 Nearly a Posting Virtuoso
Public Class Form1
    '// declared array.
    Private itemstocks(2) As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '// assign specific values.
        itemstocks(0) = 100
        itemstocks(1) = 200
        itemstocks(2) = 300
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '// add on to the values.
        itemstocks(0) += 50
        MsgBox(itemstocks(0)) '// result: 150
        itemstocks(1) += 50
        MsgBox(itemstocks(1)) '// result: 250
        itemstocks(2) += 50
        MsgBox(itemstocks(2)) '// result: 350
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Unless you need to keep certain data in ListBox1, clearing the ListBox before running the code should do the trick.

ListBox1.Items.Clear()
        For Each itemlist As ListViewItem In ListView1.Items
            If itemlist.Checked = True Then
                ListBox1.Items.Add(itemlist.Text)
            Else
                ListBox1.Items.Remove(itemlist.Text)
            End If
        Next
codeorder 197 Nearly a Posting Virtuoso

Start New Project and click the Save All option.
You should get an option to choose a location for your new project.
This new location gets stored for the next time you save a new project.

As for non-saved projects, it uses the Temporary Projects folder.
Those projects get deleted unless saved.

If it helps any, load windows explorer on form Load.

Process.Start(Application.StartupPath)
codeorder 197 Nearly a Posting Virtuoso

Your post is very confusing to figure out.
In just a few words, explain what "exactly" is the problem you need help with.

codeorder 197 Nearly a Posting Virtuoso

On Form1 you are declaring your variables "Locally", therefore only Form1 has access to them.

To declare something "Globally" you need to change "Dim" to "Public".
Example of a "Global Declaration" on Form1:

Public Gcoins As String = "1,000,000 gazillion & a couple billions."

And to get the variable from another form, I used the following:

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MsgBox(Form1.Gcoins)
    End Sub
codeorder 197 Nearly a Posting Virtuoso
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBox1.Text = "http://daniweb.com"
    End Sub

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

    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If e.KeyChar = Chr(13) Then
            e.Handled = True '// cancel beep noise.
            Button1.PerformClick() '// programatically press button1.
        End If
    End Sub
End Class

Since Textbox1 will probably not be multi-line, pressing the Enter Key will cause a "beep" sound. This beep sound is a Windows error sound to notify the user that the Textbox cannot accept the enter key for a new line.

As in the code posted, I have added a line of code to cancel out the beep noise.:)

codeorder 197 Nearly a Posting Virtuoso

See if the following sample project helps about using a Tab's .Tag property.

Public Class Form1
   
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '// clear the default tabs.  should be done from designer mode. 
        For Each coolDefaultTab As TabPage In TabControl1.TabPages
            TabControl1.TabPages.Remove(coolDefaultTab)
        Next
        Button1.Text = "New File" : Button2.Text = "Open File" : Button3.Text = "Save File"
        '// check if tab is available, else add new tab.
        If TabControl1.TabPages.Count = 0 Then
            addNewTab()
        End If
    End Sub

    Private Sub addNewTab()
        Dim newTab As New TabPage
        newTab.Tag = "" '// used to determine which tab is accessing which file.
        newTab.Text = "New CodeOrder :)" '// add a title text to the new tab.
        Dim newRtb As New RichTextBox With {.Dock = DockStyle.Fill, .ForeColor = Color.SlateGray} '//design a richtextbox.
        newTab.Controls.Add(newRtb) '// add richtextbox to new tab.
        TabControl1.TabPages.Add(newTab) '// add new tab to tabcontrol.
        '// select the new tab.
        TabControl1.SelectedIndex = TabControl1.TabPages.Count - 1
        '// since newRtb is the first control added to your new tab, you will refer to it by Index, as "Controls(0)".
        TabControl1.SelectedTab.Controls(0).Select() '// select the richtextbox.
    End Sub

    '// New File.
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        addNewTab()
    End Sub

    '// Open File
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If TabControl1.TabPages.Count = 0 Then  '// if no tabs available, add new tab.
            addNewTab()
        End If
        '// get the appropriate richtextbox.
        Dim mySelectedRichtextbox As RichTextBox = TabControl1.SelectedTab.Controls(0)
        '// load a file.
        Dim …
codeorder 197 Nearly a Posting Virtuoso

Use the .ProgressChanged Event of the Webbrowser you are using.

Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
        ProgressBar1.Maximum = e.MaximumProgress
        ProgressBar1.Value = e.CurrentProgress
    End Sub