codeorder 197 Nearly a Posting Virtuoso

I was able to load a Form in WebBrowser.:D
(apologies for being off.topic)

codeorder 197 Nearly a Posting Virtuoso
codeorder 197 Nearly a Posting Virtuoso

Hope this might provide some light on the matter as well.

debasisdas commented: the link neatly explains. +13
codeorder 197 Nearly a Posting Virtuoso

See if this helps. Place on Form1.

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        With Form2 '// shorten code.
            .TabControl1.SelectedTab = .TabPage2 '// select Tab.
            .ShowDialog() '// display as MsgBox, not giving access to previous Form until closed.
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso

>>e.g Start with a capital.

With TextBox1
            .Text = StrConv(.Text, VbStrConv.ProperCase)
        End With
codeorder 197 Nearly a Posting Virtuoso

>>which software i download vb6? or vb studio?...
Microsoft Visual Studio 2010 Professional Trial - ISO

codeorder 197 Nearly a Posting Virtuoso

Thy this in a new project.
1 ListView, 1 Button

Public Class Form1
    Private WithEvents tmrCountDown As New Timer With {.Interval = 1000, .Enabled = True} '// countDown Timer.
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With ListView1 '// FOR TESTING.
            .View = View.Details : .FullRowSelect = True
            With .Columns
                .Add("Customer Name", 150) : .Add("Time Remaining", 125)
            End With
            With .Items
                .Add(New ListViewItem("Some Name,100".Split(","c)))
                .Add(New ListViewItem("Some otherName,300".Split(","c)))
            End With
        End With
        Button1.Text = "Add Time"
    End Sub

    Private Sub tmrCountDown_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrCountDown.Tick
        With ListView1
            If Not .Items.Count = 0 Then
                For Each itm As ListViewItem In .Items
                    itm.SubItems(1).Text -= 1
                Next
            End If
        End With
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        With ListView1
            If Not .SelectedItems.Count = 0 Then
                .SelectedItems(0).SubItems(1).Text += 50
            Else
                MsgBox("Select a customer to add time to.")
            End If
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

What are loading/logging customers into? A ListView?
.If a ListView, easy. Just use one Timer and on each Timer.Tick, loop thruough all items in the ListView and subtract time from time.remaining until at "0". The Timer will do it's own thing and you can always add more time to the selected customer.

codeorder 197 Nearly a Posting Virtuoso

There might be a way to check length of each binary and if one is corrupt, to identify it.
If you still need help with this, post a few lines of original binary content and a few lines of binary contents altered.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private isTab1Selected As Boolean = False

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TabControl1.SelectedIndex = 1 '// select Tab2.
    End Sub

    Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
        With TabControl1
            If .SelectedIndex = 0 Then isTab1Selected = True '// if 1st Tab selected, set the Boolean to True.
            If isTab1Selected Then .SelectedIndex = 0 '// if Boolean=True, keep the First Tab selected.
        End With
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

shivya, debasisdas is quite correct since you did not supply sufficient information regarding your question.

To calculate salary, I can start w/hourly wages, overtime, weekends pay, vacation time on/off, bonuses, etc..
You need to supply the required info for your question, not disrespect the ones that offer to help.

Question is, where do I start to even try to provide a possible solution for your thread?

codeorder 197 Nearly a Posting Virtuoso

Only way I would assume to determine if a file is corrupt, is to compare the contents to it's original file content. Just opinion.

codeorder 197 Nearly a Posting Virtuoso
Dim myStartupFolderPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Startup)
codeorder 197 Nearly a Posting Virtuoso

Also, check out this thread in case you just need the FileNames, not FullPaths to display in ListBox.

codeorder 197 Nearly a Posting Virtuoso

Overlooking your code, I think this might help your little finger from scrolling so much and the rest of the world from not using the electricity to load similar code over and over again.

Private Sub clearBoxes()
        boxButton1.Text = ""
        boxButton2.Text = ""
        boxButton3.Text = ""
        boxButton4.Text = ""
        boxButton5.Text = ""
        boxButton6.Text = ""
        boxButton7.Text = ""
        boxButton8.Text = ""
        boxButton9.Text = ""
    End Sub

Other than that, see if this helps.

Public Class Form1
    Private sPlayer1 As String = "Player One"
    Private sPlayer2 As String = "Player Two"
    Private sPlayerInTurn As String = sPlayer1

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Text = sPlayerInTurn
    End Sub

    Private Sub _boxButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles boxButton1.Click, boxButton2.Click, boxButton3.Click, boxButton4.Click '// etc...
        If sPlayerInTurn = sPlayer1 Then sPlayerInTurn = sPlayer2 Else sPlayerInTurn = sPlayer1
        Me.Text = sPlayerInTurn
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

I'm really not sure since I do not bother w/db programming yet, although see if this helps.
.That thread link, saves an image to a .txt file and reads it back. Could be possibly done the same w/db, not just a TEMP .txt file, although not sure. Good luck.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Dim x As String =  "<p><img src=""http://www.freesmileys.org/smileys/smiley-happy114.gif"" alt="""" title=""www.freesmileys.org"" />Hello World</p>"
        x &= "<center>"
        x &= "<span style=""font-size:25px;font-weight:bolder;"">From </span>"
        x &= "<a href=""http://www.daniweb.com/""><img src=""http://images.daniweb.com/logo.gif"" align=""middle"" border=""0"" alt="""" title=""DaniWeb IT Discussion Community"" /></a>"
        x &= "<br /><br /><img src=""http://www.freesmileys.org/smileys/smiley-happy020.gif"" alt="""" title=""www.freesmileys.org"" />"
        x &= "<br /><img src=""http://www.freesmileys.org/smileys/smiley-happy110.gif"" alt="""" title=""www.freesmileys.org"" />"
        x &= "<br /><img src=""http://www.freesmileys.org/smileys/smiley-happy095.gif"" alt="""" title=""www.freesmileys.org"" />"
        x &= "</center>"
        WebBrowser1.DocumentText = x

Basically, you have to set a String and only set the .DocumentText of the wb(WebBrowser) once.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Private Sub loadFile(ByVal myCoolSelectedFile As String)
        If IO.File.Exists(myCoolSelectedFile) Then
            Process.Start(myCoolSelectedFile)
        Else
            MsgBox("This file does not exist.")
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        loadFile("C:\someFile.someExtension")
    End Sub
sujimon commented: this helped me in my project !! +1
codeorder 197 Nearly a Posting Virtuoso

Read html code from where? A file? Your app.'s code lines?
Post html code sample that you want to display in your wb.

codeorder 197 Nearly a Posting Virtuoso

>>...it to populate as each char is typed is name john at the moment if I type jo it goes to o rather than continue to populate

You get what you ask for.:)

codeorder 197 Nearly a Posting Virtuoso

Then your rows are empty when first running the code.

codeorder 197 Nearly a Posting Virtuoso

Are all the LinkLabels on the Form or are they in separate containers as Panels?
If in separate containers, then you need to loop thruough each container's controls, not thruough the Form's controls. A simple Sub with a Parameter should do this just nicely.

If you still have issues with this, post the code that you have so far.

codeorder 197 Nearly a Posting Virtuoso
Private Sub ComboBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.TextChanged
        With ComboBox1
            Select Case .Text.Length
                Case Is > 1
                    Me.Text = .Text(.Text.Length - 1)
                Case Else
                    Me.Text = .Text
            End Select
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso
codeorder 197 Nearly a Posting Virtuoso

Refresh how? Clear values in TextBoxes/Controls or just Me.Refresh() ?

codeorder 197 Nearly a Posting Virtuoso

See if this helps.
Form99:

Public Class Form99
    Public selForm As Form = Nothing

    Private Sub frm99_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.TextBox1.Text = CType(selForm.Controls("TextBox1"), TextBox).Text
        Me.TextBox2.Text = CType(selForm.Controls("TextBox2"), TextBox).Text
    End Sub
End Class

All other Forms:

With Form99
            .selForm = Me
            .Show()
        End With
codeorder 197 Nearly a Posting Virtuoso

Go btn:

With TabControl1.SelectedTab
            CType(.Controls.Item(0), WebBrowser).Navigate(TextBox1.Text)
            .Text = CType(.Controls.Item(0), WebBrowser).DocumentTitle
            .Tag = TextBox1.Text '// Add URL to .Tag of SelectedTab.
        End With

Add Tab btn:

Private myHomepageURL As String = "http://oceanviewnewtab.webs.com"

    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        With TabControl1
            Dim browser As New WebBrowser With {.Name = "New_Tab", .Dock = DockStyle.Fill}
            .TabPages.Add("New Tab" & i + 1)
            .SelectTab(i)
            .SelectedTab.Controls.Add(browser)
            AddHandler browser.ProgressChanged, AddressOf bar_loading
            AddHandler browser.DocumentCompleted, AddressOf done
            CType(.SelectedTab.Controls.Item(0), WebBrowser).Navigate(myHomepageURL)
            .SelectedTab.Tag = myHomepageURL '// Add URL to new tab's.Tag.
            i += 1
            .SelectedTab.Text = CType(.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle
        End With
    End Sub

TabControl:

Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
        With TabControl1.SelectedTab
            If Not .Tag Is Nothing Then TextBox1.Text = .Tag
        End With
    End Sub

Let me know if this takes care of the issue or if we need to take some more baby steps.:D

codeorder 197 Nearly a Posting Virtuoso

Let's take baby steps.
1st. How are you navigating to a site for a selectedTab, or how are you getting the url into your TextBox from the selectedTab's WebBrowser? Post code.

codeorder 197 Nearly a Posting Virtuoso

Do you mean to run the links/buttons that you added to the .DocumentText?

codeorder 197 Nearly a Posting Virtuoso

I'm a bit confused on your new question.
What's not responding as needed? Does not Exit Sub?

codeorder 197 Nearly a Posting Virtuoso

:)

codeorder 197 Nearly a Posting Virtuoso

Try this in a new project with a TabControl containing 2 TabPages.

Public Class Form1
   
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With TabControl1
            .TabPages(0).Tag = "hi"
            .TabPages(1).Tag = "hello"
        End With
    End Sub

    Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
        With TabControl1.SelectedTab
            If Not .Tag Is Nothing Then MsgBox(.Tag)
        End With
    End Sub
End Class

All you have to do everytime you navigate a wb on a tabPage, set the .Tag of the .SelectedTab to the url you are navigating to.
Some webpages might change urls once your wb has finished loading the website, therefore it would be wise to set the .Tag in the wb_DocumentCompleted event as well.

codeorder 197 Nearly a Posting Virtuoso

Off topic? Send a p.m. and thank Dani for this handy p.m.'ing option to keep threads a little more on topic, especially for an IT forum. Then send me a p.m. If needed; otherwise, just a Hobbyist Programmer here.

codeorder 197 Nearly a Posting Virtuoso

Care to share Chris, or is it a confidential type of "my coder's bag of goodies" item?

codeorder 197 Nearly a Posting Virtuoso
If Not reader.HasRows Then
                        MsgBox("Data does not exist")
                    Else
                        MsgBox("Data Exists")
                        Exit Sub '// skip all remaining code in the Sub.
                    End If
codeorder 197 Nearly a Posting Virtuoso

Use the .Tag Property of the selectedTab when navigating to a site, to store the URL in. When switching between tabs, retrieve the .Tag of the selectedTab and display it in your TextBox. Hope this helps.

codeorder 197 Nearly a Posting Virtuoso
Dim sDate As String = Date.Now.ToString("dd/MM/yyyy - hh:mm tt")
        MsgBox(sDate)
codeorder 197 Nearly a Posting Virtuoso
Public Class frm99
    Public sNameOfForm As String = Nothing

    Private Sub frm99_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MsgBox(sNameOfForm)
    End Sub
End Class

And for all other Forms:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        With frm99
            .sNameOfForm = Me.Name
            .Show()
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso

Remove all the db(database) code from the Form and test. If it runs without issues, close this thread and start a new one regarding your "new" issue. Thanks in advance and glad I could provide assistance thus far.:)

codeorder 197 Nearly a Posting Virtuoso

.Caption from DevExpress? Kind of lame from my point of view, if it is just a .Text Property.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private myFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\New.txt"
    Private arFileContent() As String = Nothing

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If File.Exists(myFile) Then
            arFileContent = File.ReadAllLines(myFile) '// load file lines into Array.
            Kill(myFile) '// delete file.
            MsgBox(arFileContent(0)) '// FOR TESTING, READ LINE 1.
        End If
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Line 17/18, uses .Caption, which I believe is vb6 for .Text. Change those to .Text and let us know the result on the foreign p.c. when trying to run the app..

codeorder 197 Nearly a Posting Virtuoso

This thread is solved, stop replying until further questions by o.p.. Thanks.

codeorder 197 Nearly a Posting Virtuoso

Seems that the issue is not the code I provided, it is a issue within your app..
Post your frmLogin code for evaluation.

codeorder 197 Nearly a Posting Virtuoso

Seems reasonable, have fun, and I hope it is not too confusing to pick up on the posted code.:)

codeorder 197 Nearly a Posting Virtuoso
Dim myCoolPassWordFile As String = "C:\myPassword.txt"
        IO.File.WriteAllText(myCoolPassWordFile, TextBox1.Text)
codeorder 197 Nearly a Posting Virtuoso

Confusing question; care to share more in depth detailed info?

codeorder 197 Nearly a Posting Virtuoso

note:
I just recently saw this thread that has Encoding and Decoding. I was only aware of Enconding, not Decoding.
If Encoding and Decoding is not needed in my provided code, you should be able to remove those commands from loading/saving the file; although if needed, look more in depth into how those 2 differenciate and how to get them to respond properly.

codeorder 197 Nearly a Posting Virtuoso

I'm still done with this thread.:D
Glad I could help.:)

codeorder 197 Nearly a Posting Virtuoso

Try my previous code in a new project.
Leave Form1's .Name as is and add a new form named "frmLogin".
Don't forget about the app.s properties of "When last form closes".

Let me know how that goes, and if still Nothing, I am still done with this thread. Good luck.