codeorder 197 Nearly a Posting Virtuoso

See if this helps.

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

When Debugging your project, it will use the bin\Debug folder. In this case, you will need to add your 2 folders to that directory.

After publishing your application and having it install, make sure that those 2 folders are in the same folder as your .exe.

codeorder 197 Nearly a Posting Virtuoso
Dim stroutput As Decimal

A Decimal is a Number, not Text. You need to declare it "As String" and include the value within the quotation marks.

Dim strOutput As String
        strOutput = "w"
        TextBox2.Text = strOutput

As for the rest, see if this helps.

Public Class Form1

    Private Function translateWord(ByVal selectedWord As String) As String
        '// use .ToLower in case there are LowerCase words that start with "a".
        If selectedWord.ToLower.StartsWith("a") Then selectedWord &= "-Way" '// use "&" when adding to a String.
        Return selectedWord
    End Function

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strWords() As String = TextBox1.Text.Split(" "c) '// .Split .Text into arrays.
        TextBox2.Clear()  '// Clear your TextBox for new input.
        For Each w As String In strWords '// loop thru all arrays.
            TextBox2.Text &= " " & translateWord(w) '// add space and word to TextBox.
        Next
    End Sub
End Class
shawn130c commented: Descriptions on the code helped alot. +1
codeorder 197 Nearly a Posting Virtuoso

Probably not unless you program it to, but that is another question and not "code for autonumber on vb.net form".

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

How many controls do you need to add to every new tab?

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

See if this link helps.

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

We're here, but you can keep waiting since this seems like another gimmick to cheat a company out of their hard earned cash like your other thread.

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

See if this helps.

newtab.Controls.Add(newctrl) '// add control to new tab.
        TabControl1.Controls.Add(newtab) '// add tab to TabControl.
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

See if this helps.

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick
        If Not ListView1.SelectedItems.Count = 0 Then '// check if item is selected.
            With ListView1.SelectedItems(0)
                Dim lvItem() As String = {.Text, .SubItems(1).Text, .SubItems(2).Text} '// get ListView selectedItem.
                DataGridView1.Rows.Add(lvItem) '// add it to DataGridView.
            End With
        End If
    End Sub
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

See if this helps.
1 PictureBox, 2 Buttons

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        PictureBox1.Top += 5
        PictureBox1.Left += 5
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        PictureBox1.Top -= 5
        PictureBox1.Left -= 5
    End Sub
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

About your recent code posted, check if "Ok" is clicked, otherwise it will delete the file even if you cancel.

If SaveFileDialog1.ShowDialog = DialogResult.OK Then
            My.Computer.FileSystem.DeleteFile(foundFile)
        End If

Specify shortcuts, start a new thread and supply more information.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Dim myPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\Text"
        If Not IO.Directory.Exists(myPath) Then IO.Directory.CreateDirectory(myPath) '// create if it does not exist.
        For Each foundFile As String In My.Computer.FileSystem.GetFiles _
       (My.Computer.FileSystem.SpecialDirectories.MyDocuments, _
       FileIO.SearchOption.SearchTopLevelOnly, "*.txt")
            My.Computer.FileSystem.MoveFile(foundFile, myPath & "/" & IO.Path.GetFileName(foundFile))
        Next

The issue was that you are getting the full file path when you use "foundFile" and you only need to get the FileName and Extension of the "foundFile" to have it moved.

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 only helped because I thought this was to block ADs mostly for personal use, not to get rich doing it. I will not support such. How's that for "legitimate".

jlego commented: + +0
codeorder 197 Nearly a Posting Virtuoso

See if this helps.
1 WebBrowser(navigating to your webpage with the adf.ly AD)

Public Class Form1

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        '// Since the link you need to skip the AD is located in the <head> section of the webpage, you need to only get that source code.
        Dim sAD_page As String = WebBrowser1.Document.GetElementsByTagName("head").Item(0).InnerHtml '// get <head> HTML content.
        If sAD_page.Contains("function showSkip") Then '// check content for the "showSkip" JavaScript Function.
            skipAd(sAD_page, WebBrowser1) '// send source code and which WebBrowser used to skip the AD.
        End If
    End Sub

    Private Sub skipAd(ByVal htmlSourceCode As String, ByVal selectedWebBrowser As WebBrowser)
        With htmlSourceCode '// shorten code.
            Dim iIndex As Integer = .IndexOf("function showSkip") '// locate the JavaScript Function.
            iIndex = .IndexOf("http:", iIndex) '// locate the URL in the Function.
            htmlSourceCode = .Substring(iIndex, .IndexOf("'", iIndex) - iIndex) '// extract only URL.
            selectedWebBrowser.Navigate(htmlSourceCode) '// Navigate to extracted Link from the JavaScript Function of "function showSkip".
        End With
    End Sub
End Class

Give the webpage a few seconds to navigate to your Skip Ad Button URL.

codeorder 197 Nearly a Posting Virtuoso

Can you paste HTML source code from a webpage you are trying to use this for?
You might be able to accomplish this by not using SendKeys and just filling out values in certain TextBoxes, then press the Submit Button.

codeorder 197 Nearly a Posting Virtuoso

Check out this thread about using SendKeys.
To pause in between the SendKeys, you can use:

Threading.Thread.Sleep(1000) '// 1000 is a second.
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

Check out this thread about "UserProfile".

You can also use this to get a user's Desktop directory.

Dim sCoolDesktopDirectory As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
        MsgBox(sCoolDesktopDirectory)
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
Form2.ProgressBar1.Value = Me.ProgressBar1.Value
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

I apologize for the confusion. I'm a newbie at JavaScript/HTML.:D

Your original HTML button code should have worked.

<input type="submit" onclick="return fnbValidateLogin();" value="Login" name="Login">

<script type="text/javascript">
    function fnbValidateLogin() {
	alert('Validating Login.');
	}
</script>

Like mentioned, nothing wrong with the original vb.net code you have posted, something is not correct in your HTML code.

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
        For Each curElement As HtmlElement In theElementCollection
            If curElement.GetAttribute("value").Equals("Login") Then
                curElement.InvokeMember("onclick")
                Exit For
            End If
        Next
    End Sub
codeorder 197 Nearly a Posting Virtuoso

Seems that it is not your vb.net code, but your HTML.
Try it with this HTML Button.

<input type="submit" onclick="javascript:alert('test');" value="Login" name="Login">

I do believe that your onclick for the button should be "onclick="fnbValidateLogin();" .

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

Only thing I can think of is for you to encrypt/decrypt the user names and save/load those.
If encrypted properly, with special characters and randomly encrypting them each time, it should make that much more difficult for anyone to decrypt the user names.

codeorder 197 Nearly a Posting Virtuoso

A bit confusing to understand.
Are you trying to change the value of a String that has been already preset?