Oxiegen 88 Basically an Occasional Poster Featured Poster

But because he posted the question in the VB.NET forum, perhaps something in code would be nice.

.NET has two very useful objects for managing files and directories.
DirectoryInfo and FileInfo.
With those you can do pretty much anything.

In order to locate all the files within a directory, you pass the top most folder of those files to the constructor of a DirectoryInfo object.
Then you can iterate through the Files collection and pass each file to a FileInfo object.
From there you simply copy the file to a new destination.

Private Sub CopyFiles()
        'Pass the top-most folder to the DirectoryInfo constructor
        Dim dd As New System.IO.DirectoryInfo("<original_path>") 'Ex: C:\SomeFolder
        'Iterate through the Files collection and pass each file
        'to a FileInfo object
        For Each ff As FileInfo In dd.GetFiles("*.*", SearchOption.AllDirectories) 'AllDirectories for recursing through sub-folders
            'Copy the file to a new destination
            ff.CopyTo("<newpath>" & ff.Name) 'Ex: C:\NewFolder\ (ending backslash required)
        Next
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

You can use the MouseMove event and check if the mouse pointer is within the Bounds of the stripmenu item.
If that's the case, simply change the BackgroundColor.

Private Sub menuitem1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
        If menuitem1.Bounds.Contains(e.Location) Then
            menuitem1.BackColor = Color.Beige
        Else
            menuitem1.BackColor = Color.White
        End If
    End Sub
SeniorAlexandro commented: Thank you. +1
Oxiegen 88 Basically an Occasional Poster Featured Poster

I didn't quite catch that. But I assume that you want the filename to be displayed in a textbox on another form.
Use the saveFileDialog1.Filename property and store it in a class variable.
You can then pass that to the constructor, or custom property, of the second form.

You can use FtpWebRequest to transfer files to and from ftp servers.
Here is a FTP client library in C#.

And here is an example of how to use it.

Oxiegen 88 Basically an Occasional Poster Featured Poster

All of these examples are perfectly good. When it comes down to it, it's a matter of preference for which way to go.
There really is no right or wrong method.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Close. Just switch it around a bit. Like this:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim saveFileDialog1 As New SaveFileDialog()

        saveFileDialog1.Filter = "PHP files (*.php)|*.php|All files (*.*)|*.*"
        saveFileDialog1.FilterIndex = 2
        saveFileDialog1.RestoreDirectory = True

        If saveFileDialog1.ShowDialog() = DialogResult.OK Then
            myStream = saveFileDialog1.OpenFile()
            If (myStream IsNot Nothing) Then
                ' Code to write the stream goes here.
                Dim myStream As Stream

                'Create the file stream for writing
                Dim stream As New StreamWriter(myStream)

                'Write the initial PHP line
                stream.WriteLine("<?PHP")

                'Write the include statement for the header
                stream.WriteLine("include_once('top.php'); ?>")
               
                'And now, write out all the lines from the richtextbox
                For Each line As String In RichTextBox1.Lines()
                   stream.WriteLine("echo """ & line & """;")
                Next

                'Write the include statement for the footer
                stream.WriteLine("<?PHP include_once('down.php');")

                'Write the end of the PHP file
                stream.WriteLine("?>)")

                'Flush and close the stream when you're done
                stream.Flush()
                stream.Close()

                myStream.Close()
            End If
        End If
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

If you format the text in the richtextbox with bullets and lists and what not, and wish to "export" the same layout to the php file. Then I cannot help you, because I don't know how.

Oxiegen 88 Basically an Occasional Poster Featured Poster

It quite simple to write to a text file, in this case a php file.
There are many ways you could do this. This would work for me.

Private Sub CreatePHPFile()
        'First, delete the existing (if any) file.
        If File.Exists(Application.StartupPath & "\filename.php") Then
            File.Delete(Application.StartupPath & "\filename.php")
        End If

        'Create the file stream for writing
        Dim stream As New StreamWriter(Application.StartupPath & "\filename.php", False)

        'Write the initial PHP line
        stream.WriteLine("<?php")

        'Write the include statement for the header
        stream.WriteLine("include_once('top.php');")

        'And now, write out all the lines from the richtextbox
        For Each line As String In rtbTextBox.Lines()
            stream.WriteLine("echo """ & line & """;")
        Next

        'Write the include statement for the footer
        stream.WriteLine("include_once('down.php');")

        'Write the end of the PHP file
        stream.WriteLine("?>)")

        'Flush and close the stream when you're done
        stream.Flush()
        stream.Close()
    End Sub

As for bulleted text and any such formatting.
All you have to do is to insert any html tags before and after the For loop using the stream.WriteLine() method.
The tag for a bulleted list is this: <ul><li>text</li></ul>

Oxiegen 88 Basically an Occasional Poster Featured Poster

It depends on the context.
If all you want is to find out if an email address is valid and properly formatted, then you should look into using regular expressions.
There are tons of examples out there.
Just google "vb.net regex email validation" (without the quotes).

Oxiegen 88 Basically an Occasional Poster Featured Poster

Unfortunately, those properties cannot be overridden.
Otherwise you could have have used the DefauleValue attribute.
You can however create your own properties with those names and use any default values you wish.

<DefaultValue(True/False)> _
Public Property AllowUserToAddRows() As Boolean
   Get
      Return MyBase.AllowUserToAddRows
   End Get
   Set(ByVal value As Boolean)
      MyBase.AllowUserToAddRows = value
   End Set
End Property
Oxiegen 88 Basically an Occasional Poster Featured Poster

Both would work for what you intend to do.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Most computers today have the Microsoft XPS Document Writer.
You can print to that.
It creates an XPS file at a location that you choose, that you can view and share with others.

Oxiegen 88 Basically an Occasional Poster Featured Poster

You could use two ArrayLists.
For each ArrayList as an item in another ArrayList.
The "outer" ArrayList contains the rows, and the "inner" ArrayList contains the columns.

Dim arrRows As New ArrayList

For Each row As DataRow In <datatable>.Rows
   Dim arrCols As New ArrayList
   arrCols.Items.Add(row("first column"))
   arrCols.Items.Add(row("second column"))
   arrCols.Items.Add(row("third column"))
   arrCols.Items.Add(row("fourth column"))
   'and so on

   arrRows.Items.Add(arrCols)
Next

To access those rows and columns in the ArrayLists, you can do this.

For Each item As ArrayList in arrRows
   variable1 = item(0)
   variable2 = item(1)
   variable3 = item(2)
   variable4 = item(3)
Next

'Or this

someVariable1 = arrRows(0)(0) 'Retrieve the first "cell" in the first row
someVariable2 = arrRows(2)(3) 'Retrieve the fourth "cell" in the third row
Oxiegen 88 Basically an Occasional Poster Featured Poster

Change this line:

cat.Create("Provider=Microsoft.ace.OLEDB.12.0;Data Source=C:\Customer\Customer.accdb")

to this:

cat.Create("Provider=Microsoft.ace.OLEDB.12.0;Data Source=C:\Customer\Customer.accdb:Database Password=<password>")
Oxiegen 88 Basically an Occasional Poster Featured Poster

There are three ways you can do that (as far as I know).
1: On the child form you can enable or disable a form in the designer.
2: In the code of the child form, you can type: Me.Enabled = True/False
3: In the code of the MDI container, you can type: <childform instance>.Enabled = True/False

Just make sure that the child form is not modal, in case you need to access it's parent form.

Oxiegen 88 Basically an Occasional Poster Featured Poster

That's kind of the point.
In codebehind you can set which CSS class to use at any given moment.

What you'll do is simply shifting from ASP style code to ASP.NET style code.

A second choice that you have is to use only one class specification, but perform the IF's and class changes using JavaScript.
There are many tutorials out there on how to accomplish this.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Many of the controls that you are used to in VB6 has either been removed or gotten replaced.
The control you mention is one of them. Most likely you can use DataGridView instead as it has similar (but not identical) features as the old flexgrids.

When you upgrade from a VB6 project to any version of .NET, be prepared to replace between 90-100 % of the code.
*Been there, done that*

Oxiegen 88 Basically an Occasional Poster Featured Poster

You misspelled DISTINCT in "SELECT DISTICT Media Type FROM Libraries".

Oxiegen 88 Basically an Occasional Poster Featured Poster

In your search method you're reading the query directly into a datatable, which you then use as a datasource for the datagridview.

But in the update method you're using a dataset as the source for the da.Update method.
The dataset has not been filled with a datatable named "Tracker".

I also noticed that you assign a databindingsource to the datagridview in the form load event.
But you're not using it.

Oxiegen 88 Basically an Occasional Poster Featured Poster

I think it would be easier to add an ID and a runat="server" attribute to the TD and change the class from codebehind.
Just put a default class there, run the IF statement in the codebehind code and change the class from there.

Oxiegen 88 Basically an Occasional Poster Featured Poster

1. The connection string is the easy one. Provider=Microsoft.ACE.OLEDB.12.0;Data ource=<path to file>\database.accdb;Persist Security Info=False; .

2. It depends. If you know that more than one record will be returned, then storing them in a DataTable would be good.
From there you can browse each record by the simple use of an index value.

3. Then that's what you should go with.

4. This is an example for locating and storing the results in a DataTable.

Imports System.Data.OleDb

Private table1 As DataTable

Private Sub SearchDatabase()
   Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data ource=<path to file>\database.accdb;Persist Security Info=False;"
   Dim connection As New OleDbConnection(connectionString)
   Dim adapter As New OleDbDataAdapter()
   Dim command As OleDbCommand()

   Try
      connection.Open()
      If txtBoxSingleDate.Text.Equals("") Then
         command = New OleDbCommand("SELECT * FROM table1 WHERE [Date] BETWEEN '" & txtBoxDate1.Text & "' AND '" & txtBoxDate2.Text & "'", connection)
      Else
         command = New OleDbCommand("SELECT * FROM table1 WHERE [Date] = '" & txtBoxSingleDate.Text & "'", connection)
      End If

      table1 = New DataTable("table1")
      adapter.Fill(table1)

      connection.Close()
   Catch ex As Exception
   End try
End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Have you tried using HttpWebResponse.ResponseUri?

Dim response As HttpWebResponse
Dim resUri As String

response = request.GetResponse
resUri = response.ResponseUri.AbsoluteUri
Oxiegen 88 Basically an Occasional Poster Featured Poster

Well. It depends on your definition of control.

Let's say for instance that you fill out some information on the first form, and wish to transfer some of it to the next form.
You could put that information into an ArrayList and use that as an argument in the second forms constructor.

'First form
Private Sub Form_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
    If Me.WindowState = FormWindowState.Minimized Then
        Dim data As New ArrayList
        data.Add(<some text>)
        data.Add(<some number>)
        'and so on...

        Dim frm As New secondForm(data)
        frm.Show()
    End If
End Sub

'Second form
Private incomingData As ArrayList

Public Sub New()
   Initialize Component()
End Sub

Public Sub New(data As ArrayList)
   InitializeComponent()
   incomingData = data
End Sub

Private Sub secondForm_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
   'Do something with the data in the ArrayList, incomingData
End Sub

This is just one way of transferring "control".

Oxiegen 88 Basically an Occasional Poster Featured Poster

Try this.
It's very simple, and it won't keep track of which textbox you remove.

Private btnID As Integer = 1
Private txtTop As Integer = firsttextBox.Top

Private Sub addButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles addButton.Click
   Dim txtBox As New TextBox
   txtBox.Name = "txt" & buttonID
   txtBox.Width = firstTextBox.Width
   txtBox.Top = txtTop + txtBox.Height + 3
   txtBox.Left = firsttextBox.Left
   txtTop = txtBox.Top
   Me.Controls.Add(txtTop)

   Dim btnRemove As New Button
   btnRemove.Name = "btn" & buttonID
   btnRemove.Width = addButton.Width
   btnRemove.Text = "Remove"
   btnRemove.Top = txtBox.Top
   btnRemove.Left = addButton.Left
   AddHandler btnRemove.Click, AddressOf removeBtnTxtBox_Click
   Me.Controls.Add(txtTop)

   btnID += 1
End Sub

Private Sub removeBtnTxtBox_Click(ByVal sender As Object, ByVal e As EventArgs)
   Dim ID As Integer = DirectCast(sender, Button).Name.SubString(3, 1)
   
   Me.Controls.RemoveByKey("txt" & ID)
   Me.Controls.RemoveByKey("btn" & ID)
End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

You might be able to use the WindowState to enable the second form.
Just check to see if the current forms new WindowState is Minimized.

Private Sub Form_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
        If Me.WindowState = FormWindowState.Minimized Then
            'Create or transfer control to second form
        End If
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster
If Not System.IO.File.Exists("<path and filename>") Then
   If MessageBox.Show("The database file cannot be found. Would you like to browse for it?","Missing database file", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
      'Create an OpenFileDialog here and use the path for the connection string
   Else
      Return
   End If
End If
Oxiegen 88 Basically an Occasional Poster Featured Poster
Oxiegen 88 Basically an Occasional Poster Featured Poster

MsgBox is the old VB style way. To use it you need to reference the legacy libraries.
MessageBox is the .NET way.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Ok. I managed to get it to work.
Use the codes I gave you, but add one single line to the Student class.

In the method Add_Node_Student, add the line "kq.Name = sv._CODE".

The Find(key, True) method is looking for the NAME of the node.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Alright.
RemoveByKey seems to only remove nodes from the position in the tree where you call it.
Replace the line "liststudentTreeView.Nodes.RemoveByKey(key)" with this:

Dim node() As TreeNode = liststudentTreeView.Nodes.Find(key, True)
liststudentTreeView.Nodes.Remove(node(0))
Oxiegen 88 Basically an Occasional Poster Featured Poster

I see your point.
Then a slight change might be in order. Try this:

Dim key As String
Dim arrUser As ListView.SelectedListViewItemCollection
arrUser = liststudentListView.SelectedItems

For Each item As ListViewItem In arrUser
    key = item.Text
    liststudentListView.Items.Remove(item)
    liststudentTreeView.Nodes.RemoveByKey(key)
Next

This should remove the treenode containing the exact same student code as the item in the listview.

Oxiegen 88 Basically an Occasional Poster Featured Poster

If the item has been added at the same place in both the TreeView and the ListView, then you can make a note of the index of the selected item in the ListView before you delete it.
You can then use that index to locate the corresponding node in the TreeView and delete that node.

Dim index As Integer
index = ListView1.SelectedIndices.Item(0)
ListView.SelectedItems.Item(0).Remove()

TreeView.Nodes.RemoveAt(index)
Oxiegen 88 Basically an Occasional Poster Featured Poster

You can do the same thing using a DataReader object.
Simply state the criteria in a SQL query and count the rows.
This is just a suggestion....

Dim con As New OleDbConnection("<onnection string>")
con.Open()
Dim com As New OleDbCommand("SELECT COUNT(*) FROM <table> WHERE <column4> = 'No' AND <some other criterias to limit the result>", con)
If Cint(com.ExecuteScalar()) > 0 Then
   MsgBox("You are not currently scheduled for Training! Please see your Trainer.", MessageBoxIcon.Stop)
End If
con.Close()
Oxiegen 88 Basically an Occasional Poster Featured Poster

Enclose your code in a Try...Catch statement.

Private Sub aMethod()
   Try
      'Your code goes here
   Catch ex As Exception
      MessageBox.Show(ex.Message, "An error has occured")
   End Try
End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Try this...

ListView1.Items(<index>).Selected = True
ListView1.Select() 'Important line
Oxiegen 88 Basically an Occasional Poster Featured Poster

In order to calculate the average of a column in MS Access, you need to use the AVG function.

SELECT [Student ID], [First Name], [Last Name], and so on, AVG([Project#1]) AS avg1, AVG([Project#2]) AS avg2, AVG([Project#3]) AS avg3 FROM <table>

This will calculate the average of ALL rows, unless you also add a WHERE clause, in which you restrict which rows to calculate.

However, if you wish to have an average for each separate row then the query will be different.

SELECT [Student ID], [First Name], [Last Name], and so on, ((NZ([Project#1],0) + NZ([Project#2],0) + NZ([Project#3],0)) / 3) AS Average FROM <table>

The NZ function will test if the field contains NULL, and return a value of 0 if it does.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Most likely it's quite wise to read the FireBirdSQL FAQ.
http://www.firebirdfaq.org/faq19/

It's SQL, but you can execute SQL programmatically from VB.NET.

Oxiegen 88 Basically an Occasional Poster Featured Poster

In Internet Explorer. Go to Internet Options->Connections->Lan settings.
If you enable "Automatically detect settings", you should no longer have to manually configure the proxy settings for each environment.
When you laptop is behind a proxy, those settings should be detected and your browser configured accordingly.

If that doesn't work, perhaps this might be of use.

Oxiegen 88 Basically an Occasional Poster Featured Poster

If you set pictureBox1.Image = Nothing before setting the resized image, the picturebox will be cleared and the original image will not be there anymore.
Only the resized one.

Oxiegen 88 Basically an Occasional Poster Featured Poster

I'm using a single method for resizing images in both directions.
It returns a BitMap object that you can use on wherever you like.

public BitMap ResizeBitMap(BitMap source, Size newSize)
{
   //Get the source bitmap
   BitMap bm_source = source;

   //Create a bitmap for the result
   BitMap bm_dest = new BitMap(newSize.Width, newSize.Height);

   //Create a Graphics object for the resulting BitMap
   Graphics gr_dest = Graphics.FromImage(bm_dest);

   //Copy the source image into the destination bitmap
   gr_dest.DrawImage(bm_source, 0, 0, bm_dest.Width + 1, bm_dest.Height + 1);

   //Return the result
   return bm_dest;
}

Here is one way of how you can use it:

private void someMethod()
{
   BitMap resizedImage = ResizeBitMap(loadedImage, new Size(loadedImage.Width * .9, loadedImage.Height * .9));

   //Stick that resized bitmap anywhere you like it.
   //For example a PictureBox
   pictureBox1.Image = resizedImage;
}
Oxiegen 88 Basically an Occasional Poster Featured Poster

Take another look at the connectionstring and pay close attention to the filename itself.
In a hurry I mistakenly switched some letters around in the extension.
So change "Contact.mbd" to "Contact.mdb".

Oxiegen 88 Basically an Occasional Poster Featured Poster

So. What exactly does the exception say?

If the connectionstring is at fault, then the most probable culprit is the path to your database.
I inserted Application.StartupPath (the path from where your programs EXE file is executed), because I figured that's where your MDB file is located.

Oxiegen 88 Basically an Occasional Poster Featured Poster

If the table that you want to save the data to is the same table that you use to populate the DataGridView, then I suggest that you use databinding to bind the DataGridView to a DataTable.
You can find several solutions for databinding right here on DaniWeb.

Every time that you make a change in the DataGridView, the DataTable will be updated to match those changes.
When you click the Save button, you can push those changes from the DataTable onto the database.

Oxiegen 88 Basically an Occasional Poster Featured Poster

This is a very simple example of how to fetch, insert, update and delete data from a MS Access database.
By default you can also see how to connect to it.

However, consider that a contact database will eventually contain several records, you should also be able to use this and figure out a way to browse between them.

Imports System
Imports System.Data.OleDb

Public Class Form1
    Private connString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Application.StartupPath & "\Contact.mbd; User Id=admin; Password=;"
    Private intID As Integer

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

    Private Sub cmdNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNew.Click
        InsertData()
    End Sub

    Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
        UpdateData()
    End Sub

    Private Sub cmdDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDelete.Click
        DeleteData()
    End Sub

    Private Sub FetchData()
        Dim con As New OleDbConnection(connString)
        Dim com As OleDbCommand = Nothing
        Dim reader As OleDbDataReader = Nothing

        Try
            con.Open()
            com = New OleDbCommand("SELECT * FROM contact", con)
            reader = com.ExecuteReader(CommandBehavior.CloseConnection)
            If reader.HasRows Then
                intID = reader("ID")
                If Not IsDBNull(reader("Name")) Then txtName.Text = reader("Name")
                If Not IsDBNull(reader("Company")) Then txtName.Text = reader("Company")
                If Not IsDBNull(reader("Contact")) Then txtName.Text = reader("Contact")
            End If
            reader.Close()
        Catch ex As Exception
            If con.State = ConnectionState.Open Then
                con.Close()
            End If
        End Try
    End Sub

    Private Sub InsertData()
        Dim con As New OleDbConnection(connString)
        Dim com As OleDbCommand = Nothing

        Try
            con.Open()
            com = New OleDbCommand("INSERT INTO contact (Name, …
Oxiegen 88 Basically an Occasional Poster Featured Poster

Swing a cat. :)
Although. If there's even a slight chance that a computer might be used by more than one user, you should seriously consider using the CommonApplicationData folder.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Take a look at this project: The DataGridViewPrinter Class
It might also be possible to use it with a ListView.

Oxiegen 88 Basically an Occasional Poster Featured Poster

I'm sorry, but I'm not familiar with FSCommand.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Well. When looking at the "main" source code for the page, you can extract the URL for each document in the frames.
Browse to each document and then use the same technique to look at the source.

It'll be a two-step process, but at least you won't be billed by your IT-department.

Oxiegen 88 Basically an Occasional Poster Featured Poster

If you're using Internet Explorer, you can use the Page menu and select View Source (or the View menu and select Source).
In FireFox, go to Tools->Web Developer and select Page Source (or press CTRL+U).
In Google Chrome, click the wrench and go to Tools and select View Source.

Oxiegen 88 Basically an Occasional Poster Featured Poster

I'm sorry to say, No.
Any timer, either on an ASP.NET page or in an Ajax method, are tied to be run while in an opened browser.
The only way I can think of would be if you could have a script available, that takes care of sending those newsletters, and also be able to manipulate the servers scheduling agent.

What I'm thinking here is that when you click the button, you create a new schedule that executes said script.
But unless it's your own server, I doubt that any web host would allow you access to Windows core services.

If that was possible, the scheduler would take care of sending those newsletters for you.

Oxiegen 88 Basically an Occasional Poster Featured Poster

That blog was written in 2008, perhaps they have made some updates since then.
I noticed in one of the comments below that "request.Version" has another value.

If you take a look in "PayPalSvc.wsdl" and locate the entry "ns:version" you might find the correct value to use.