codeorder 197 Nearly a Posting Virtuoso

.life's honest, though not really.

codeorder 197 Nearly a Posting Virtuoso

.life>:faith,comfort,and spirit.

codeorder 197 Nearly a Posting Virtuoso

>>How on earth can you multiply strings together If all .Numeric, Then "why.Not?"

codeorder 197 Nearly a Posting Virtuoso

.line.14, include those values in parentheses: "Total pay: " & (txtHoursWorked.Text * lstHourlyRate.SelectedItem + txtHoursOvertime.Text * DoubleRate)) and it should work.

codeorder 197 Nearly a Posting Virtuoso

This is the LinkLabel.Form and Form1 is your login.Form.

Public Class Form2

    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        Me.Hide()
        With Form1
            .TextBox1.Clear() : .TextBox2.Clear() '// un/pw TextBoxes.
            .ShowDialog()
        End With
        Me.Close()
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Set the "Shutdown mode:" in fileMenu/Project/your app's Properties, Application tab To "When last form closes".

codeorder 197 Nearly a Posting Virtuoso

"_GotFocus" and other events are in the "_GotFocus".

Private Sub _TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus, TextBox2.GotFocus '// TextBoxEtc.GotFocus
        With CType(sender, TextBox)
            If .Text.Length > 0 Then .SelectAll()
        End With
    End Sub
codeorder 197 Nearly a Posting Virtuoso

.that's "api" stuff, gets.stuff about Windows on.Desktop and does sh.t.

codeorder 197 Nearly a Posting Virtuoso

>>in the property in the option MRL i gave the video address which should be played
Seems that the url for the Files are not located in the same directory as the user's.directory.
.ex: If your directories are "C:/some folder on my vb.net p.c./" Then If your user's directories are Not "C:/some folder on my vb.net p.c./" AndAlso user want's to watch vid on "C:/some folder on my vb.net p.c./" Return :).

codeorder 197 Nearly a Posting Virtuoso

>>yes it want support on this
See if this helps.:)

Imports System.IO
Public Class Form1
    Private myFile As String = "c:\test.txt"
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListBox1.Items.AddRange(New String() {"1", "f1", "f2"})
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        Static selCoolItem As String '// stores the .SelectedItem to verify against the previously .SelectedItem.
        With ListBox1
            If Not .SelectedIndex = -1 Then '// if itm selected.
                If Not selCoolItem = .SelectedItem Then '// check if same item as previously .SelectedItem, if one selected.
                    selCoolItem = .SelectedItem '// store .SelectedItem in String.
                    For Each itm As String In File.ReadAllLines(myFile) '// read File.Lines and...
                        If itm = selCoolItem Then Return '// ...Exit Sub w/less typing. ;)
                    Next
                    Dim w As New IO.StreamWriter(myFile, True) : w.WriteLine(selCoolItem) : w.Close() '// append to File.
                End If
            End If
        End With
    End Sub
End Class
gozo12 commented: Oh god :) . this is worked perfectly . THANKS YOU SO MUCH AGAIN +1
codeorder 197 Nearly a Posting Virtuoso

>>this looks like alien language to me
.vb.net?or the api.stuff in the posted.code?

codeorder 197 Nearly a Posting Virtuoso

Issue solved since thread solved? or do you still need support on this?

codeorder 197 Nearly a Posting Virtuoso

Also, see if this helps.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListBox1.Items.AddRange(New String() {"1", "f1", "f2"})
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        Static selCoolItem As String '// stores the .SelectedItem to verify against the previously .SelectedItem.
        With ListBox1
            If Not .SelectedIndex = -1 Then '// if itm selected.
                If Not selCoolItem = .SelectedItem Then '// check if same item as previously .SelectedItem, if one selected.
                    selCoolItem = .SelectedItem '// store .SelectedItem in String.
                    Dim w As New IO.StreamWriter("c:\test.txt", True) : w.WriteLine(selCoolItem) : w.Close() '// append to File.
                End If
            End If
        End With
    End Sub
End Class

If you don't want the same item to be added to the file, load File in an Array, loop thru all lines and if item found Then Exit the entire Sub with "Exit Sub". If not found, have the code to append to file just underneath your For/Next loop.

gozo12 commented: ITS REALLY WORKED :D THANKS YOU SO MUCH +1
codeorder 197 Nearly a Posting Virtuoso

You should also check out this website, especially if vb.noob.
http://www.homeandlearn.co.uk/NET/vbNet.html

codeorder 197 Nearly a Posting Virtuoso

rows() is an Array, as: dim rows() as string={"row 1","row 2","row etc."} and if you want a value from it, use msgbox(rows(2)) .
Since you are trying to only set 1 String to a String Array, you will need to set it as I did, not as setting it to a String only as = "blah" & "blah".

Also, not a db.coder here, though it looks like your error line is a connection.string for a database, not to get the rows from a DataTable.

codeorder 197 Nearly a Posting Virtuoso

Is the error on line.3?Then .Remove the last "&" since it does not add anything else to the value of your rows .

codeorder 197 Nearly a Posting Virtuoso

Dim userID As Integer = CType(ListBox1.SelectedItem, Int32) will error since you cannot convert a String to an Integer.
.To get the value, use something as: Dim userID As String = ListBox1.SelectedItem .

codeorder 197 Nearly a Posting Virtuoso

Are you just trying to get the value from the .SelectedItem in the ListBox?
.reason asking: you already have the .SelectedIndex.

codeorder 197 Nearly a Posting Virtuoso

>>...button (the play button) that doesnt work, and the restore button that does work...
Just thinking here; it might have to do with the ProperCase of the "play", which should actually be capitalized as "Play".
.reason provided: In JavaScript, if you use ".innerHtml" instead of ".innerHTML" you will get no results.

codeorder 197 Nearly a Posting Virtuoso

>>“Those who do not learn from history are doomed to repeat it”
<<What must be accomplished, shall be accomplished.

Confidence in one's reality is not for everyone, it is for that one.

codeorder 197 Nearly a Posting Virtuoso

What must be accomplished, shall be accomplished.

codeorder 197 Nearly a Posting Virtuoso

Today is just, forever guided by truth.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

Public Class Form1
    Private WithEvents tmr As New Timer With {.Enabled = True} '// dynamic.Timer.

    Private Sub tmr_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmr.Tick
        Me.Text = ListBox1.TopIndex '// display the top visible item's Index.
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

Use the FormClosing event.

Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        '// save code here.
    End Sub
codeorder 197 Nearly a Posting Virtuoso

Use this to get html.content.

And extract data you need with this.

Dim sHtmlContent = "READ THE 3 CHARACTERS AFTER ""abc""... << this is the part im struggling at"
        Dim sToFind As String = "abc"
        With sHtmlContent
            If .Contains(sToFind) Then
                sHtmlContent = .Substring(.IndexOf(sToFind) + sToFind.Length)
                '  sHtmlContent = .Substring(.IndexOf(sToFind) + sToFind.Length, 9) '// 9 for length of data you need to extract.
                MsgBox(sHtmlContent)
            End If
        End With
codeorder 197 Nearly a Posting Virtuoso

If I were in a cloud of smoke and really high, as floating above the world, would that make .Me a God?

codeorder 197 Nearly a Posting Virtuoso

Just wondering; do the lines have to be in the Button's.Click event or can they be in separate Subs?as:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        someCoolSub()
        someOtherCoolSub()
    End Sub
    Private Sub someCoolSub()
        MsgBox("someCoolSub")
    End Sub
    Private Sub someOtherCoolSub()
        MsgBox("someOtherCoolSub")
    End Sub

Reason I'm asking is because you can use the Threading.Thread.Sleep , although that will freeze your entire application for 5 seconds, not just pause the the time between running the rest of the lines of code.

codeorder 197 Nearly a Posting Virtuoso

See if this helps.

With DataGridView1
            Static iTopRow As Integer
            iTopRow = .FirstDisplayedScrollingRowIndex '// get Top row.
            Form2.ShowDialog()'// Form that edits record.
            .FirstDisplayedScrollingRowIndex = iTopRow '// set Top row.
        End With
codeorder 197 Nearly a Posting Virtuoso

Where are you getting the images from? Another Folder? A web.page? And how?

codeorder 197 Nearly a Posting Virtuoso

Not to start anything here, though I do believe that "val" is vb6- related and could possibly cause issues in future .Net Frameworks.

codeorder 197 Nearly a Posting Virtuoso

I started laughing about that today.

codeorder 197 Nearly a Posting Virtuoso

Then populate the TextBoxes first and add handlers to the Text_Changed event right after.
If you need to give it time to populate them, use Application.DoEvents just prior to assigning them the Text_Changed event.

You can also remove the handlers if ever needing to repopulate and then assign the handlers back.

codeorder 197 Nearly a Posting Virtuoso

Not related to the solved thread, though I hope it helps to minimize less lines of code.

For Each grp In New GroupBox() {GroupBox1, GroupBox2, GroupBox3, GroupBox4}
            For Each ctl As Control In grp.Controls
                If TypeOf (ctl) Is TextBox Then
                    AddHandler ctl.TextChanged, AddressOf Text_Changed
                End If
            Next
        Next

Btw, why not just set the .Tag of each TextBox to something as "1" if it contains .Text and .Text has changed, and "0" if all ok?

codeorder 197 Nearly a Posting Virtuoso

I would try to skip the entire Try/Catch on this issue and check if a numeric value.

If IsNumeric(txtPrice.Text) Then
            '// do stuff here
        Else
            MsgBox("Not a number")
        End If

Just my 2.cents worth.

codeorder 197 Nearly a Posting Virtuoso

...with the laughing gas of yesterday.

codeorder 197 Nearly a Posting Virtuoso

I plan to lose myself today since the greatest treasure hunt of all, is finding yourself again.

codeorder 197 Nearly a Posting Virtuoso

Googling.Images and finding 2 mice pointing a gun at one another:D, was supposedly an "awkward" search result.

Earthbound

codeorder 197 Nearly a Posting Virtuoso

Not a db.coder, do not have any input on "is there anyway in which i can do something like Check if database content ='s Today's Date and Time...".
Good luck and glad I could help so far.:)

codeorder 197 Nearly a Posting Virtuoso

Is a p.m. a traitor, if received in the time of a.m.?

codeorder 197 Nearly a Posting Virtuoso

Did you know that an Aardvark can also fly?

Evolution

codeorder 197 Nearly a Posting Virtuoso

There are no clouds that cover the sky, there are only clouds that block your view from it.

codeorder 197 Nearly a Posting Virtuoso

Secondary issue, see if this helps.

For i As Integer = 0 To picBoxes.Length - 1
            With picBoxes(i)
                .pictureBox = CType(Me.Controls("PictureBox" & i + 1), PictureBox)
                .cover = My.Resources.ImperialLogo
                .pictureBox.Image = .cover
            End With
        Next

edit::
To make it easier on you the next time you need to add more than one control to an event, use something as this in Form_Load, instead of adding "pic1.click, pic2.click, picEtc.click".

For i As Integer = 1 To 36
            With CType(Me.Controls("PictureBox" & i), PictureBox)
                AddHandler .Click, AddressOf PictureBox1_Click
            End With
        Next

Hope this helps.:)

codeorder 197 Nearly a Posting Virtuoso

I will Not be filling well tomorrow.

codeorder 197 Nearly a Posting Virtuoso

>>using the monthcalendar tool instead of datetime picker?? whats the advantages?
Advantages/Disavantages, other than the design, Not really certain. Have never had much use for either one of those, other than replying to threads with a possible solution for them.

>>"how would i save the date and time selected to my database".
I would probably do something as...
.If it is a TimeSpan of 2Dates, that it has to alert everyday between the two, I would save it as: 02/19/12 - 03/19/12
.notice the "-" between the two. When checking your database, load that item, check if it .Contains("-") and if it does, validate that the last date has not passed. If not, alert at the appropriate time.
.If it is random days that it has to alert, I would save as:02/19/12, 03/19/12, 04/19/12, etc., and I would check if it .Contains(",") Then .Split the item by the "," in an Array and validate each Array's Date until locating the appropriate Date.

Just a note.
.Instead of constantly checking your db(database), I would load the items in Memory, as a Array and only search that from the timer. Seems more reasonable and less work for your p.c., even if just a box, it can probably stress out just as easy.

codeorder 197 Nearly a Posting Virtuoso

>>if some are empty it wont work
What exactly are these "some"?

codeorder 197 Nearly a Posting Virtuoso

Creating DLL's for such a large project can possibly be a pain in the neck, If not done from the beginning.

Another idea would be to create a bunch of smaller apps(sidekick.apps) that load up only when needed and accomplish the tasks that a current Form/Option in your project does.

codeorder 197 Nearly a Posting Virtuoso

>>Not 100% sure what you mean by 2 ArrayLists.
Simple.

Public Class Form1
    Private arlFullNames, arlUserNames As New ArrayList

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        arlFullNames.Add("some full name")
        arlUserNames.Add("some full name's username")
        arlFullNames.Add("another full name")
        arlUserNames.Add("another full name's username")
        ComboBox1.Items.AddRange(arlFullNames.ToArray)
    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        MsgBox(arlUserNames(ComboBox1.SelectedIndex))
    End Sub
End Class
codeorder 197 Nearly a Posting Virtuoso

>>if you could help me i will be forever thanking you.
S.O.B., I missed out on the eternal.Thanks?:(
>>Please continue sharing your knowledge...God speed!!!
Just to get all biblical, I have no knowledge that God does not have, for I am one of his kids.

Everything else, glad I could help.:)

codeorder 197 Nearly a Posting Virtuoso

Not a database coder here, though could you not remove InvNomer, from sSql = "SELECT FullName ,InvNomer, BalanceDue From Invoice" and have it as sSql = "SELECT FullName , BalanceDue From Invoice" ?

codeorder 197 Nearly a Posting Virtuoso

>>"Separate in different DLL "
It seems to me that you should create DLL's from the Modules and Classes and use the DLL's to run your app from.
I have not worked with DLL's in projects, created a few samples, though I do believe that you add them as a Reference to the project.