codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 ComboBox

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If Not Date.IsLeapYear(CInt(ComboBox1.SelectedItem)) Then MsgBox("Not a Leap Year.") Else MsgBox("Leap year.")
    End Sub

This link might be of use.

codeorder 197 Nearly a Posting Virtuoso
TextBox1.Text = x '// ?
codeorder 197 Nearly a Posting Virtuoso

See If this helps.

Public Class Form1
    '// Prices for the CheckBoxes as Decimal Arrays.
    Private myCoolCheckBoxPrices() As Double = {3.99, 2.79, 3.29, 1.39, 1.59, 1.99, 2.56}
    Private myCustomerTotalSpendingAllowed As Double = 17.59 '// Total a Customer has set for Spending Limit.

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
                                    Handles _
                                      Hamsandwich.CheckedChanged, hamburger.CheckedChanged, lettucewrap.CheckedChanged, _
                                      sodapopsmall.CheckedChanged, sodapoplarge.CheckedChanged, fries.CheckedChanged, sidesalad.CheckedChanged
        Dim myTotalPrice As Double = 0 '// Reset Total Price.
        '// If CheckBox is Checked, add the Decimal Array to myTotalPrice.
        If Hamsandwich.Checked Then myTotalPrice += myCoolCheckBoxPrices(0)
        If hamburger.Checked Then myTotalPrice += myCoolCheckBoxPrices(1)
        If lettucewrap.Checked Then myTotalPrice += myCoolCheckBoxPrices(2)
        If sodapopsmall.Checked Then myTotalPrice += myCoolCheckBoxPrices(3)
        If sodapoplarge.Checked Then myTotalPrice += myCoolCheckBoxPrices(4)
        If fries.Checked Then myTotalPrice += myCoolCheckBoxPrices(5)
        If sidesalad.Checked Then myTotalPrice += myCoolCheckBoxPrices(6)
        Me.Text = myTotalPrice.ToString("c") '// Display result.
        '//----- compare TotalPrice with the price the customer has set for spending limit.
        If myTotalPrice > myCustomerTotalSpendingAllowed Then '// if price goes over, alert customer with the amount over the set limit.
            MsgBox("Total price has went over your customer's spending limit." _
            & vbNewLine & "Amount over the limit: " & (myCustomerTotalSpendingAllowed - myTotalPrice).ToString("c"), MsgBoxStyle.Critical)
        End If '-----\\
    End Sub
End Class

I guess that a penny does make a difference after all.:D

codeorder 197 Nearly a Posting Virtuoso

Attached image has a CheckBoxImage.Size of (13, 13) and is not as off-centered as yours.
As for fixing every little issue "every time" one occurs, that is not for me to do.

Glad I could help otherwise and that I could provide a few suggestions and/or solutions.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 PictureBox, 1 Button

Public Class Form1
    Private myCoolFile As String = "C:\test.txt" '// File to save/load FullPath of Image.

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        '// Save File if there is a FullPath in the .Tag.
        If Not PictureBox1.Tag Is Nothing Then IO.File.WriteAllText(myCoolFile, PictureBox1.Tag.ToString)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PictureBox1.SizeMode = PictureBoxSizeMode.AutoSize '// Resize PictureBox by Image Size.
        If IO.File.Exists(myCoolFile) Then '// check if File.Exists.
            Dim sTemp As String = IO.File.ReadAllText(myCoolFile) '// read File content, which should only be the image location of last image loaded.
            If IO.File.Exists(sTemp) Then '// check if last image path saved .Exists.
                PictureBox1.Image = Image.FromFile(sTemp) '// Load image in PictureBox.
                PictureBox1.Tag = sTemp '// set .Tag to image's FullPath.
            End If
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim OpenFileDialog1 As New OpenFileDialog
        With OpenFileDialog1
            .CheckFileExists = True
            .ShowReadOnly = False
            .Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg;*.png"
            .FilterIndex = 2
            If .ShowDialog = DialogResult.OK Then
                PictureBox1.Image = Image.FromFile(.FileName) '// Load image.
                PictureBox1.Tag = .FileName '// keep FullPath of image for saving to file.
            End If
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

The only reasonable solution that is probably the best solution to use, is not to add a CheckBox control on top of the ListView, but to add images in the ColumnHeader of the ListView.

For this next piece of code to work properly, you will need to have 2 images of the CheckBox not Checked and Checked, and specify their location if different from "C:\".
1 ListView, 2 images(attached)

Public Class Form1

    Private Sub designListView()
        With ListView1
            .Size = New Size(125, 125)
            .Columns.Add("", 25) '// No Titled Column and sized for image of CheckBoxes.
            .Columns.Add("Column 1", 100)
            .Columns.Add("Column 2", 100, HorizontalAlignment.Center)
            .View = View.Details : .CheckBoxes = True : .FullRowSelect = True
            '// When adding Items, do not add it as the Item's.Text, Start adding at the first .SubItem of the Item.
            Dim x As String = ",item1 subitem1,subitem2" : Dim lvItm As New ListViewItem(x.Split(","c)) : .Items.Add(lvItm)
            x = ",item2 subitem1,subitem2" : lvItm = New ListViewItem(x.Split(","c)) : .Items.Add(lvItm)
            x = ",item3 subitem1,subitem2" : lvItm = New ListViewItem(x.Split(","c)) : .Items.Add(lvItm)
        End With
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        designListView() '// For TESTING.
        Dim imgList As New ImageList With {.ImageSize = New Size(13, 13), .ColorDepth = ColorDepth.Depth32Bit} '// New ImageList.
        Dim imgCheckedNot As Image = Image.FromFile("C:\checkedNot.png") '// image for Not Checked.
        Dim imgChecked As Image = Image.FromFile("C:\checked.png") '// image for Checked.
        '// Add 2 images to the ImageList.
        imgList.Images.Add(imgCheckedNot) '// Add Not Checked Image first.
        imgList.Images.Add(imgChecked) '// Add Checked Image.
        ListView1.SmallImageList = …
codeorder 197 Nearly a Posting Virtuoso

...am getting the error durng runtime 'conversion from string "" to type 'Double' is not valid

The following will throw the "Conversion from string "" to type 'Double' is not valid." error.

Private x As String = ""
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        x += 1
        MsgBox(x)
    End Sub

To solve this issue, you will need to check the value and make sure it is not a empty value before it has to be modified.

Private x As String = ""
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If x = "" Then x = "0" '// if empty, add a value.
        x += 1
        MsgBox(x)
    End Sub

Hope this helps.

codeorder 197 Nearly a Posting Virtuoso

Tricky little CheckBox.:D

Ok, I have a solution.
Add a Panel, set the Panel's "AutoScroll=True" in the Panel's Properties.
Add your ListView within this panel, size the ListView to where all Columns are/should be visible without the horizontal scrollbar, and make the Panel smaller than the ListView.
This should add the horizontal scrollbar to the Panel and not the ListView.

When adding the CheckBox, instead of adding it to the Form Me.Controls.Add(cbCheckUncheckALL) '// Add CheckBox to Form. , add it to the Panel instead.

Panel1.Controls.Add(cbCheckUncheckALL) '// Add CheckBox to Form.

Now another issue arises, and that is the issue of the vertical scrollbar for the ListView.
This issue can be solved by sizing the ListView by the items.Count and causing the Panel to have the vertical scrollbar instead, but it is nothing like having the ListView's vertical scrollbar to use. :(

I will try and find a possible solution for this and will reply back to this thread if/when I do. Otherwise, I hope this quick fix helps.

codeorder 197 Nearly a Posting Virtuoso

Check out this thread for "a simple If statement around it".

codeorder 197 Nearly a Posting Virtuoso
Dim Obj1 As New Form2
        '// other code here.
        Obj1.Show()
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Public a, b, c As Decimal
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Not IsNumeric(TextBox1.Text) Then Exit Sub
        Dim Obj1, Obj2 As New Form2
        a = CDec(TextBox1.Text)
        b = 1 + a
        c = 2 + a
        Obj1.Label1.Text = CStr(b)
        Obj2.Label2.Text = CStr(c)
        Obj1.Show()
        Obj2.Show()
    End Sub
End Class
Public Class Form2

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With Form1
            Label1.Text = CStr(.a)
            Label2.Text = CStr(.b)
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Option 1. Add a blank titled column just for the CheckBoxes and start adding your ListView Items from the first SubItem and not as the Item.Text. (image 1)

With ListView1
            .Columns.Add("", 23) '// No Titled Column and sized for CheckBoxes.
            .Columns.Add("Column 1", 100)
            .View = View.Details : .CheckBoxes = True : .FullRowSelect = True
            Dim lvItm As New ListViewItem(",subitem".Split(","c)) : .Items.Add(lvItm)
            lvItm = New ListViewItem(",subitem".Split(","c)) : .Items.Add(lvItm)
            lvItm = New ListViewItem(",subitem".Split(","c)) : .Items.Add(lvItm)
        End With

Option 2. If your first Column is titled "Column 1", add a few empty spaces just prior to the title for accommodating the CheckBox.(image 2)

With ListView1
            .Columns.Add("     Column 1", 100)
            .Columns.Add("Column 2", 100)
            .View = View.Details : .CheckBoxes = True : .FullRowSelect = True
            Dim lvItm As New ListViewItem("item,subitem".Split(","c)) : .Items.Add(lvItm)
            lvItm = New ListViewItem("item 2,subitem".Split(","c)) : .Items.Add(lvItm)
            lvItm = New ListViewItem("item 3,subitem".Split(","c)) : .Items.Add(lvItm)
        End With
jlego commented: + +2
codeorder 197 Nearly a Posting Virtuoso

I do not believe that there is such a Property, unless you create one.:)

See if this helps otherwise.
3 Panels (including Labels and TextBoxes as your attached images)

Public Class Form1
    Private iWidth As Integer = 0 '// used to resize.

    Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
        iWidth = CInt((Me.ClientRectangle.Width - 20) / 3) '// change the "-20" to work as needed for your project.
        Panel1.Width = iWidth : Panel2.Width = iWidth : Panel3.Width = iWidth '// resize Panels.
        Panel2.Left = Panel1.Left + Panel1.Width + 5 : Panel3.Left = Panel2.Left + Panel2.Width + 5 '// set Panels New Locations.
        resizeTextBoxes(Panel1) : resizeTextBoxes(Panel2) : resizeTextBoxes(Panel3) '// resize TextBoxes in Panels.
    End Sub

    Private Sub resizeTextBoxes(ByVal selectedPanel As Panel)
        For Each ctl As Control In selectedPanel.Controls
            If TypeOf ctl Is TextBox Then ctl.Width = (selectedPanel.Width - ctl.Left) - 5 '//  "-5" accumulates the space of TextBox and end of Panel.
        Next
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Let me know if this helps.

Public Class Form1
    Private WithEvents cbCheckUncheckALL As New CheckBox With {.Text = "", .AutoSize = True} '// Declare New CheckBox.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '// Place CheckBox above ListView, in the location of ListView's Column 1.
        cbCheckUncheckALL.Location = New Point(ListView1.Location.X + 6, ListView1.Location.Y + 6) '// Set Location to work for your ListView.
        Me.Controls.Add(cbCheckUncheckALL) '// Add CheckBox to Form.
        cbCheckUncheckALL.BringToFront() '// Set CheckBox as TopMost control.
    End Sub

    Private Sub cbCheckUncheckALL_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbCheckUncheckALL.CheckedChanged
        For Each itm As ListViewItem In ListView1.Items
            If cbCheckUncheckALL.Checked Then itm.Checked = True Else itm.Checked = False '// Toggle Check/UnCheck ALL.
        Next
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

1 Button, 2 TextBoxes

Public Class Form1
    Private myUserNames() As String = {"username 1", "username 2", "username 3"}
    Private myPasswords() As String = {"password 1", "password 2", "password 3"}
    Private iStatus As Integer = 0

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = myUserNames(iStatus) '// Display Result.
        TextBox2.Text = myPasswords(iStatus) '// Display Result.
        iStatus += 1 '// Next UserName and Password.
        If iStatus = myUserNames.Length Then iStatus = 0 '// If last UserName then go back to first UserName.
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Like having a list of User Names and a list of Passwords that you can randomly select from?

codeorder 197 Nearly a Posting Virtuoso

See if this thread helps for generating alphanumeric IDs, which can also be used to generate User Names and Passwords.

codeorder 197 Nearly a Posting Virtuoso

Use the _TextChanged Event of the TextBox.

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        With TextBox1 '// shorten typing.
            If .Text = "!Help" Then '// to not make it case sensitive, use ( If .Text = "!Help".ToLower Then ).
                .Text = "Software by (whoever) other commands" '// replace text.
                .SelectAll() '// select all text.
            End If
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso

Possible solution located in similar thread.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Private Cash As Double = 0.0, Cheque As Double = 0.0, Other As Double = 0.0 '// declare once.

    Private Sub LstvwBankDeposits_ItemChecked(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckedEventArgs) Handles LstvwBankDeposits.ItemChecked
        LblTotalCheques.Text = "0.0" : LblTotalCash.Text = "0.0" '// reset to 0.
        Cash = 0.0 : Cheque = 0.0 : Other = 0.0 '// reset to 0.
        For Each lvItem As ListViewItem In LstvwBankDeposits.CheckedItems '// Loop through only the Checked items.
            Select Case lvItem.SubItems(4).Text
                Case "Cash"
                    Cash += Double.Parse(lvItem.SubItems(3).Text)
                    With LblTotalCash
                        .Text = CType(Cash, String)
                        .Text = FormatNumber(.Text, 2)
                    End With
                Case "Check"
                    Cheque += Double.Parse(lvItem.SubItems(3).Text)
                    With LblTotalCheques
                        .Text = CType(Cheque, String)
                        .Text = FormatNumber(.Text, 2)
                    End With
            End Select
        Next
    End Sub
codeorder 197 Nearly a Posting Virtuoso

Please post your entire code in the Sub that checks for checked/not checked items.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

For Each line As String In TextBox1.Lines '// loop thru all lines in TextBox.
            If Not line = "" And line.Contains("-") Then '.. check if line is not empty and it .Contains "-".
                With line.Split("-") '// shorten code a little by using the "With" statement.
                    MsgBox("Name: " & .GetValue(0) & vbNewLine & "Phone: " & .GetValue(1)) '// Display result.
                    '// line.Split("-").GetValue(0) will .Split the line and return the first item in the array.
                End With
            End If
        Next
codeorder 197 Nearly a Posting Virtuoso
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ListBox1.Items.Clear()
    End Sub
codeorder 197 Nearly a Posting Virtuoso

Start a new project. Only add a ListView (with checkboxes) and a Button.
Load some items in the ListView and test the code I have posted. It should respond as needed.

codeorder 197 Nearly a Posting Virtuoso

See if this helps to draw on a PictureBox image and save the edited image.
1 PictureBox, 2 Buttons, 1 ComboBox

Public Class Form1
    Private myOriginalImage As String = "C:\test.png" '// Original Image File.
    Private myEditedImage As String = "C:\test_EDITED.png" '// Image File to Save the Edited Image.
    Private myGraphics As Graphics '// to draw graphics.
    Private myPen As Pen '// Pen to draw with.
    Private myPenColor As Color = Color.LawnGreen '// Pen Color to use.
    Private myPenSize As Integer = 0 '// Pen Size.
    Private allowDrawOnImage As Boolean = False '// Toggle Drawing on Image.
    Private imageToDrawOn As Image '// used to Draw on, then set back as the PictureBox.Image.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PictureBox1.Image = Image.FromFile(myOriginalImage) '// Load image in PictureBox.
        For i As Integer = 2 To 100 Step 2 : ComboBox1.Items.Add(i) : Next '// Pen Sizes to the ComboBox.
        ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList '// Disable user from typing in ComboBox.
        ComboBox1.SelectedIndex = 5 '// auto select Pen Size.
        Button1.Text = "Select Color" : Button2.Text = "Save Image"
    End Sub
    '// Select a Color to draw with.
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim myColorDialog As New ColorDialog
        If myColorDialog.ShowDialog = DialogResult.OK Then myPenColor = myColorDialog.Color
    End Sub
    '// Save Image.
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        PictureBox1.Image.Save(myEditedImage)
        MsgBox("Edited Image Saved.", MsgBoxStyle.Information)
    End Sub
    '// Select Pen Size.
    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As …
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private cls As New myCoolClass '// get access to your Class.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cls.myTimer.Enabled = Not cls.myTimer.Enabled '// toggle timer on/off.
    End Sub
End Class

Public Class myCoolClass
    '// WithEvents, to get the Events in the right ComboBox, when selecting your object in the left ComboBox of the code window.
    Public WithEvents myTimer As New Timer With {.Interval = 1000} '// 1000 is 1 second.
    '// found in the right ComboBox of top of code window.
    Private Sub myTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTimer.Tick
        drawCoolShape(Form1) '// Call the drawCoolShape Sub.
    End Sub
    '// Draw Shape.
    Private Sub drawCoolShape(ByVal selectedForm As Form)
        Static bToggleColor As Boolean = True '// Toggles the colors of the pen the shape is drawn with.
        Dim myGraphics As Graphics = selectedForm.CreateGraphics
        Dim myPen As Pen '// pen to draw with.
        '// set pen color and width.
        If bToggleColor = True Then myPen = New Pen(Color.SteelBlue, 10) Else myPen = New Pen(Color.Orange, 10)
        myGraphics.DrawEllipse(myPen, 50, 50, 10, 10) '// (preset pen, location.X, location.Y, width, height)
        bToggleColor = Not bToggleColor '// Toggle the Boolean True/False.
    End Sub
End Class

I added the Class on the same code page as Form1.
You can also add a Class as a separate Item and use the posted code in the same way.

codeorder 197 Nearly a Posting Virtuoso

thank u for that...
still it is not working properly...
if i check the checkbox a msgbox will pop up.. "item NOT checked"...

Try my code in a New Project and let me know if you get the same results.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

For Each itm As ListViewItem In ListView1.Items
            If itm.Checked Then
                MsgBox("item checked: " & itm.Text)
            Else
                MsgBox("item NOT checked: " & itm.Text)
            End If
        Next
bLuEmEzzy commented: Great... yoU are Great... +1
codeorder 197 Nearly a Posting Virtuoso

For alphanumeric ID generator, see if this helps.

Dim myChars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" '// Characters to use for ID.
        Dim myID As String = Nothing '// used to add random char. until the preset ID length.
        Dim idLength As Integer = 10 '// allow a 10 char. Alphanumeric ID.
        Dim rnd As New Random '// for randomizing char.s.
        For i As Integer = 1 To idLength '// each loop adds 1 random char. 
            myID &= myChars(rnd.Next(0, myChars.Length)) '// add random char. to String. ex: myChars(2) ='s "C".
        Next
        MsgBox(myID) '// display result.

For a alphanumeric ID that only generates a numeric increase in ID numbers, see if this helps.

Private myID As String = "CUST00025" '// ID loaded from/saved to...
    Private iTemp As Integer = 0
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        iTemp = CInt(myID.Substring(4, myID.Length - 4)) '// get only the #'s from String and Convert them to Integer.
        iTemp += 1 '// increase the ID # + 1.
        myID = myID.Substring(0, 4) & iTemp.ToString("00000") '// set the ID back with String and #'s formatted to 5 digit #.
        MsgBox(myID) '// display result.
    End Sub
bettybarnes commented: thank you :) +2
codeorder 197 Nearly a Posting Virtuoso
MRMMain.Text = cmbBoxUsers.TEXT
codeorder 197 Nearly a Posting Virtuoso

Just thought I'd help.

codeorder 197 Nearly a Posting Virtuoso

Not sure if you noticed, but you have the same code in: Private Sub TextBox5_TextChanged(... for team 2 as you do for team 1 in: Private Sub TextBox1_TextChanged(... . Both add up a total for team 1.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
2 TextBoxes, 1 Label

Public Class Form1
    Private iTeam1Total As Integer = 0 '// Declaration.

    '// Use the _TextChanged Event. Can add all TextBoxes that are for the same team, as the commented TextBox3.TextChanged.
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
                        Handles TextBox1.TextChanged, TextBox2.TextChanged ',TextBox3 .TextChanged '// etc.
        Try '//---- Catch errors to not crash the app. if not a Numeric value in TextBoxes.
            '// Add to your Team's Total.
            iTeam1Total = CInt(TextBox1.Text) + CInt(TextBox2.Text) '// CInt = Convert to Integer, since .Text is a String.
        Catch ex As Exception
        End Try '---\\
        Label1.Text = iTeam1Total '// Display Result.
    End Sub

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

LostFocus is when a Control looses Focus.
For example, you click TextBox1, then click TextBox2. TextBox1 will loose Focus and if you have anything in the TextBox1_LostFocus Event, that event will fire with the code within.

Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.LostFocus
        MsgBox("TextBox1 Lost Focus", MsgBoxStyle.Information)
    End Sub

As for debating over TextBoxes, try the different controls on your own and see which would benefit your project the best.:)

codeorder 197 Nearly a Posting Virtuoso

If you just want to Delete a File from the system, use:

IO.File.Delete("full path of file to delete here")

Otherwise, let me know if this helps.
1 Button, 1 ProgressBar(useful when shredding the file over 10,000 times :D)

Public Class Form1
    Private iNumberOfTimesToShred As Integer = 10 '// Times to load/manipulate/save the File.
    Private iNumberOfCharactersToInjectPerShred As Integer = 25 '// Characters in sCharactersToInjectIntoFile. 
    '// Loaded a image in Notepad++ and found tons of cool char. to inject into the File Randomly.
    Private sCharactersToInjectIntoFile As String = "›ÙÅ×¾e…€è½Ø`WØÙÛlÕÎÓ¶mßSöÌ‹ïº;ϼç;¶mßSöÌ‹ïº;ϼç;éHO>òßp¦B‚ƺŒßf=¦ì°¡óÓlÜòL›™tØ–l;a«wŸù1òag½1â;éHO>Ó|¤Õì0ÙšöÓqÖ#W[W­’î;uKŽ1š•Ý3Z±5²èqÃnͦíÓ0íè%;xê%;õ¯õëï}lKVm´µ[Ò,mÿIË:ù¬í>¬UÕ©:½ã¾¬Ž—fw}ýnÓe,&¹xDEb{XÑê=­tmš)ý®ƒúå=¤!î(Ê–}òeè×}Ý‘7¬v÷ÉöPöíïÿ«ýâ÷±¿üãú÷7ŸµÖî/RËÊk¨SI‹"
    Private sMain As String = Nothing '// String to load File in and manipulate the file content.
    Private sTemp, sTemp2 As String '// Temp Strings used as needed.
    Private rnd As New Random '// Used to Randomize which characters to replace and which characters to inject.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ofd As New OpenFileDialog
        If ofd.ShowDialog = DialogResult.OK Then
            sMain = IO.File.ReadAllText(ofd.FileName, System.Text.Encoding.Default) '// Load File as String.
            ProgressBar1.Maximum = iNumberOfTimesToShred : ProgressBar1.Value = 0 '// Set/Reset Properties of Progressbar.
            Do Until ProgressBar1.Value = iNumberOfTimesToShred '// Loop until the ProgressBar.Value is the Total of times to Shred.
                For i As Integer = 1 To iNumberOfCharactersToInjectPerShred '// inject random char. in file.
                    sTemp = sCharactersToInjectIntoFile.Substring(rnd.Next(0, sCharactersToInjectIntoFile.Length), 1) '// get random char.
                    rnd = New Random : sMain = sMain.Insert(rnd.Next(0, sMain.Length), sTemp) '// insert at random into File.
                Next
                sTemp = sMain.Substring(rnd.Next(0, sMain.Length), 1) '// select a random char.
                rnd = New Random : …
mrbungle commented: Great insight! +1
codeorder 197 Nearly a Posting Virtuoso

For drag and drop, check out this thread.

About "wiping" a file from the disk, do you want to just delete the file or shred the file a few times, then delete?

codeorder 197 Nearly a Posting Virtuoso

Check out this link. Read through it for more info and follow the link provided in the that thread to load an application in a Form, not a TabControl.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private myOFD As New OpenFileDialog
    Private selectedTextBox As New TextBox '// Declare new TextBox.

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

    Private Sub addTextBoxHandlers()
        Dim txt As TextBox
        For i As Integer = 1 To 36
            txt = DirectCast(Me.Controls.Item(Me.Controls.IndexOfKey("TextBox" & i.ToString)), TextBox)
            AddHandler txt.Click, AddressOf txt_Click
            AddHandler txt.GotFocus, AddressOf txt_GotFocus '// Assign each TextBox to the txt_GotFocus Event.
        Next
    End Sub

    Private Sub txt_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If myOFD.ShowDialog = DialogResult.OK Then
            CType(sender, TextBox).Text = myOFD.FileName
        End If
    End Sub

    Private Sub txt_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) ' Handles TextBox1.GotFocus
        Me.selectedTextBox = CType(sender, TextBox) '// Set sender as the selected TextBox.
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Text = Me.selectedTextBox.Text '// display text of selected TextBox.
    End Sub
End Class

------------------
As for the AddressOf...
When you do this:

Private Sub TextBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Click, TextBox2.Click, TextBox3.Click, TextBox4.Click, TextBox5.Click, TextBox6.Click, TextBox7.Click, TextBox8.Click, TextBox9.Click, TextBox10.Click, TextBox11.Click, TextBox12.Click, TextBox13.Click, TextBox14.Click, TextBox15.Click, TextBox16.Click, TextBox17.Click, TextBox18.Click, TextBox19.Click, TextBox20.Click, TextBox21.Click, TextBox22.Click, TextBox23.Click, TextBox24.Click, TextBox25.Click, TextBox26.Click, TextBox27.Click, TextBox28.Click, TextBox29.Click, TextBox30.Click, TextBox31.Click, TextBox32.Click, TextBox33.Click, TextBox34.Click, TextBox35.Click, TextBox36.Click

..You are giving each TextBox the AddressOf the .Click Event.

Basically, I took this part:

Private Sub TextBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Renamed it from: TextBox1_Click to: txt_Click and dynamically assigned that Event for each …

codeorder 197 Nearly a Posting Virtuoso

With this code sample, you can add all of your TextBoxes to the txt_Click Event in one shot.

Public Class Form1

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

    Private Sub addTextBoxClickHandlers()
        Dim txt As TextBox
        For i As Integer = 1 To 36
            txt = DirectCast(Me.Controls.Item(Me.Controls.IndexOfKey("TextBox" & i.ToString)), TextBox)
            AddHandler txt.Click, AddressOf txt_Click '// Assign each TextBox to the txt_Click Event.
        Next
    End Sub

    Private Sub txt_Click(ByVal sender As Object, ByVal e As System.EventArgs) 'Handles TextBox1.Click
        MsgBox(CType(sender, TextBox).Name)
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private myOFD As New OpenFileDialog

    Private Sub txt_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Click, TextBox2.Click, TextBox3.Click
        If myOFD.ShowDialog = DialogResult.OK Then
            CType(sender, TextBox).Text = myOFD.FileName
        End If
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    '// Prices for the CheckBoxes as Decimal Arrays.
    Private myCoolCheckBoxPrices() As Decimal = {2, 3.5, 4.35, 1.75, 5, 9.99, 0.75}
    '// To get the value of the 3rd Array, since Index based, you would use: myCoolCheckBoxPrices(2)

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim myTotalPrice As Decimal = 0 '// Reset Total Price.
        '// If CheckBox is Checked, add the Decimal Array to myTotalPrice.
        If CheckBox1.Checked Then myTotalPrice += myCoolCheckBoxPrices(0)
        If CheckBox2.Checked Then myTotalPrice += myCoolCheckBoxPrices(1)
        If CheckBox3.Checked Then myTotalPrice += myCoolCheckBoxPrices(2)
        If CheckBox4.Checked Then myTotalPrice += myCoolCheckBoxPrices(3)
        If CheckBox5.Checked Then myTotalPrice += myCoolCheckBoxPrices(4)
        If CheckBox6.Checked Then myTotalPrice += myCoolCheckBoxPrices(5)
        If CheckBox7.Checked Then myTotalPrice += myCoolCheckBoxPrices(6)
        MsgBox(myTotalPrice.ToString("c")) '// Display result.
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

If your Public declaration is on Form1, then call it like: [B]Form1.MyPath[/B] from any other Form.

Also, always set a Declaration Type when declaring something. In this case, "String" = Type.

Public MyPath As String = "C:\"
codeorder 197 Nearly a Posting Virtuoso

See if this thread helps.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private allowCoolMove As Boolean = False
    Private myCoolPoint As New Point

    Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
        allowCoolMove = True
        myCoolPoint = New Point(e.X, e.Y)
        Me.Cursor = Cursors.SizeAll
    End Sub

    Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
        If allowCoolMove = True Then
            Panel1.Location = New Point(Panel1.Location.X + e.X - myCoolPoint.X, Panel1.Location.Y + e.Y - myCoolPoint.Y)
        End If
    End Sub

    Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
        allowCoolMove = False
        Me.Cursor = Cursors.Default
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Why not subtract the Value of your ListView2.SubItem just before you remove your ListView2.Item?

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
        If ComboBox1.Text = Nothing OrElse ComboBox2.Text = Nothing Then Exit Sub
        Label1.Text = CInt(ComboBox1.Text) + CInt(ComboBox2.Text) '// CInt = Convert to Integer, since .Text is considered a String.
    End Sub
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For Each ctl As Control In Me.Controls '// Loop thru all controls.
            If TypeOf ctl Is TextBox Then '// Locate TextBoxes.
                AddHandler ctl.KeyPress, AddressOf txt_KeyPress '// Associate the KeyPress Event with the TextBox.
            End If
        Next
    End Sub
    '// Renamed from: Private Sub TextBox1_KeyPress
    Private Sub txt_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) ' Handles TextBox1.KeyPress
        If e.KeyChar <> ChrW(Keys.Back) Then
            If Char.IsNumber(e.KeyChar) Then

            Else
                MessageBox.Show("Invalid Input! Numbers Only.", "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error)
                e.Handled = True
            End If
        End If
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

If TextBox1.Text = Nothing OrElse TextBox2.Text = Nothing OrElse TextBox3.Text = Nothing Then
            MsgBox("TextBoxes CANNOT be Empty.", MsgBoxStyle.Critical)
            Exit Sub '// Skip the remaning code in the Sub.
        End If
        '// Save code here.
rEhSi_123 commented: Exactly what I was looking for! Excellent +3
codeorder 197 Nearly a Posting Virtuoso

Replace the "MsgBox(selFile) '// Show FullPath of File.)" with this.

Export = Path.GetFileName(selFile) 'sends only the filename and extension to the variable export
        FileCopy(selFile, "c:\flexihotfolder\" & Export)
ayarton commented: AWESOME! +1
codeorder 197 Nearly a Posting Virtuoso

See if this helps.

OpenFD.Multiselect = True '// Allow Multiple File Selections.
        If OpenFD.ShowDialog = DialogResult.OK Then
            For Each selFile As String In OpenFD.FileNames
                MsgBox(selFile) '// Show FullPath of File.
            Next
        End If
codeorder 197 Nearly a Posting Virtuoso

See if this helps for the TrackBar.
1 MenuStrip(MenuStrip1)

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim myTrackBar As New TrackBar '// Declare New TrackBar.
        myTrackBar.Minimum = 12 : myTrackBar.Maximum = 25 '// Customize.
        AddHandler myTrackBar.Scroll, AddressOf TrackBar_Scroll '// Give it a Event to Handle.
        Dim myCtlHost As New ToolStripControlHost(myTrackBar)
        MenuStrip1.Items.Add(myCtlHost) '// Add to Main Menu.
        '// OR...
        'FileToolStripMenuItem.DropDownItems.Add(myCtlHost) '// Add to DropDownItems.
    End Sub

    Private Sub TrackBar_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) ' Handles TrackBar1.Scroll
        Dim trk As TrackBar = CType(sender, TrackBar)
        Me.Text = trk.Value.ToString '// For testing.
    End Sub
End Class

If "numeric dropdown" is a ComboBox, right click Menu and view attached image.