Oxiegen 88 Basically an Occasional Poster Featured Poster

You can still have a DateTimePicker control on your form.
And if you wish it to be the last thing entered before adding data to the DataGrid, all you have to do is move the code previously in the SelectedIndexChanged event of the combobox into the ValueChanged event of the DateTimePicker.

When that is done, add these lines to the code that adds to the DataGrid.

cell = New DataGridViewTextBoxCell
        cell.Value = DateTimePicker1.Value.ToShortDateString
        row.Cells.Add(cell)

And also an additional line &= ";" & row.Cells(x).Value.ToString() to the SaveToFile method.

Dcurvez commented: this is by far more than ever expected..thank you 100000000000 hundred times over :) +1
Oxiegen 88 Basically an Occasional Poster Featured Poster

That is true.
However, before you can safely check the value, you need to check if the value exist.
Errors have been known to occur from time to time when storing to a database.
Therefore, first check if value exists. Then check if the value happens to be NULL.
After that, you can do your thing.

This is the part you're asking for.
In order to compare two dates, first make sure they are of the same type. Hence the call to DateTime.TryParse() method.

Dim dateTest As DateTime
        ' Test to see if the value in the database is a date
        If DateTime.TryParse(dataReader("dateColumn"), dateTest) Then
            If dateTest = DateTime.Now Then
                ' Do something
            End If
        End If
Oxiegen 88 Basically an Occasional Poster Featured Poster

Forgive me.
Based on the name of the resource Global.ExampleProject I assumed that it came from a Microsoft example project.

So. Here's another suggestion you can try.
Create a class library project where you store a bunch of resources and compile them into it as bitmaps, in the form of properties.
Then add the library as a reference to your current and future projects.
Voila, instant access to icons, images etc.

ZNERB commented: Helpful Idea +1
Oxiegen 88 Basically an Occasional Poster Featured Poster
IF dataReader.Read() Then
    If Not IsDBNull(dataReader("dateColumn")) Then
        Dim dateTest As DateTime
        ' Test to see if the value in the database is a date
        If DateTime.TryParse(dataReader("dateColumn"), dateTest) Then
            If dateTest = DateTime.Now Then
                ' Do something
            End If
        End If
    END IF
End If
Oxiegen 88 Basically an Occasional Poster Featured Poster

Your codesnippets look suspiciously at lot like this project: http://www.codeproject.com/KB/vb/toggleNetworkConn.aspx.

If you read through the authors documentation carefully you will see how to implement what you're looking for.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Something like this.

Private Sub CompareMonths()
   'I don't know what DataSet.Repair is or does.

   Dim currentMonth As Integer = DateTime.Now.Month
   Dim parseMonth As Integer = 0
   Dim parseDate As DateTime = Nothing

   ' Iterate all rows in table
   For Each row As DataRow In DataSet.Tables(0).Rows
      ' Check if field is NULL
      If Not IsDBNull(row("DateCollected")) Then
         ' Try to parse the date from the current row
         If DateTime.TryParse(row("DateCollected"), parseDate) Then
            ' Retrieve the month part of the date
            parseMonth = parseDate.Month
            ' Compare the two months
            If currentMonth.Equals(parseMonth) Then
               'Do something
            End If
         End If
      End If
   Next
End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Try replacing some of the code with this:

Dim cn As New System.Data.SqlClient.SqlConnection("your connectionstring")
            cn.Open()
            Dim getUser As New System.Data.SqlClient.SqlCommand("select Username from MegaUsers where username=?", cn)
            getUser.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Username", strmegaun))
            Dim resultsReader As System.Data.SqlClient.SqlDataReader
            resultsReader = getUser.ExecuteReader(CommandBehavior.CloseConnection)
            If resultsReader.HasRows Then
                While resultsReader.Read()
                    Response.Write(resultsReader("Username").ToString())
                End While
            End If
            resultsReader.Close()
            resultsReader = Nothing
carrzkiss commented: Thank you so much, 3 days worth of searching, for this one post! You Rock! Keep it up! Carrzkiss +3
Oxiegen 88 Basically an Occasional Poster Featured Poster

And likewise, you can also recieve mail through the same classes.
Take a look at the SmtpClient class.

kvprajapati commented: Aye! +9
Oxiegen 88 Basically an Occasional Poster Featured Poster
' Private class variable to get Document from WebBrowser control.
    Private WithEvents _document As HtmlDocument

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

    Private Sub _document_Click(ByVal sender As Object, ByVal e As HtmlElementEventArgs) Handles _document.Click
        '' Here's the coordinates
        'e.ClientMousePosition
        Dim htmlElement As HtmlElement = _document.GetElementFromPoint(e.ClientMousePosition)
        If htmlElement.GetAttribute("").Contains("") Then
            TextBox.Text = htmlElement.GetAttribute("")
        End If
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Well. Considering that a page might hold a number of this kind of tags it could prove to be a challenge.
You can use the same technique as I showed you and iterate through all the GetElementsByTagName("img") elements.
And you might have to provide some logic inside the loop to find the specific image you're looking for.

Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
        Dim imgList As List(Of String)
        For Each el As HtmlElement In htmlElements
            ' Provide additional logic if necessary
            If Not el.GetAttribute("src").Contains("sample") Then
                TextBox.Text = el.GetAttribute("src")
            End If
        Next
Oxiegen 88 Basically an Occasional Poster Featured Poster
Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")

        For Each el As HtmlElement In htmlElements
            If el.GetAttribute("name").Equals("sample") Then
                TextBox.Text = el.GetAttribute("value")
            End If
        Next
Oxiegen 88 Basically an Occasional Poster Featured Poster

created a login system that works quite well, but I need using the db or settings or a variable keep the logged in staffid and username constant on all the forms through out the forms. I have no idea how to do this. as it is information that in the end also has to be printed on the printout.

Add a module to your project, in it you can declare Public variables to store the staffid and username.

My search problem is I need to do a filter I guess with a dataset search and if it does exist it will pull that record up in detail view for editing or updating. There is a small catch to this though I need it to not overwrite the old data but keep the clientid1 and write a whole new set of information to the table or move the old set to a historical table and write the new set with everything updated and changed and the old information that is propagated to the form to the original table. I tried to do the search with a filter similar to

The Tables property in the DataSet has a Select method that you can use to filter out the contents of your dataset.
It returns an array of DataRow.

Dim row() As DataRow
row = yourdataset.Tables("Clients").Select("<here you enter an SQL where-clause")

My Last Problem is I have tables with all known zipcodes, I need it to when filled out on …

kvprajapati commented: Very very helpful. +9
Oxiegen 88 Basically an Occasional Poster Featured Poster

Instead of CheckState, try using the property Checked.
This will trigger the checkBox16_CheckedChanged event.

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ListBox1.Items.Add(ListBox1.Items.Count)

        If ListBox1.Items.Count > 5 Then
            checkBox16.Checked = True
        Else
            checkBox16.Checked = False
        End If
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster
Dim FontName As String = "Arial"
Dim FontSize As Integer = 14
Dim FS As New Font(FontName, FontSize, FontStyle.Regular)
Me.Font = FS
Oxiegen 88 Basically an Occasional Poster Featured Poster

How can i make, that program will name .txt file like "29.3.20010.txt"?

Try this: (FileMode.Append will open the file if it exists and continue writing at the end, or create a new file.)

Dim fileName As String = DateTime.Now.ToString("dd.M.yyyy")
Dim file As System.IO.FileStream = New System.IO.FileStream ("C:\Key\" & fileName & ".txt", System.IO.FileMode.Append)

all keys are written into medium sized rich text box - but how can i make, that saved text will be in same shape as it was...

The RichTextBox has an overloaded method called SaveFile.
One of it's variants takes a Stream as argument. It will retain the formatting of your RichTextBox.
Like this:

Dim fileName As String = DateTime.Now.ToString("dd.M.yyyy")
Dim file As System.IO.FileStream = New System.IO.FileStream ("C:\Key\" & fileName & ".txt", System.IO.FileMode.Append)
RichTextBox1.Save(file, RichTextBoxStreamType.RichText)
Noob.exe commented: I think it was helpfull and well explained +0
Oxiegen 88 Basically an Occasional Poster Featured Poster

Have you debugged the code and looked at the property da_test.InsertCommand.CommandText .
It should contain the appropriate SQL query.
Also, you can try putting everything inside a Try...Catch statement to see if the Update command throws any errors.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Try this:

Dim stream As System.IO.FileStream = New System.IO.FileStream(<string path to ini file>, System.IO.FileMode.Open)
Dim treader As System.IO.TextReader = New System.IO.StreamReader(stream)

Dim line As String

While treader.Peek > 0
    line = treader.ReadLine
    '' Add some checking to see if line should be added to the ListBox
    listbox1.Items.Add(line)
End While
treader.Close()
stream.Close()

Well i got my codes so Checkbox and Textbox to read ini but i cant find how to make ListBox read ini like each line in the ini is 1 item on the listbox

i have the api calls thingy and other stuff, but if you have a code or something i could use ill be so happy

Thx in advance

xfrolox commented: Rep for help ^^ +1
Oxiegen 88 Basically an Occasional Poster Featured Poster

Doesn't this all depends on how you place your monitors?
One monitor is always the primary depending on which graphics port you use on your computer.

In either case, perhaps you should take a look at the Screen class?
More specifically the property AllScreens which contains a collection of all screens.

You can check for the Primary screen with this:

If Screen.AllScreens(0).Primary Then
     '' Code for displaying box on the seconday screen
     '' using Screen.AllScreens(1).Bounds or .WorkingArea
Else
     '' Code for displaying box on the primary screen
     '' using Screen.AllScreens(0).Bounds or .WorkingArea
End If
Oxiegen 88 Basically an Occasional Poster Featured Poster

You can use the RequiredFieldValidator-control.
Put one next to each textbox or dropdownlist and bind each validator-control to the corresponding input-control.