Minimalist 96 Posting Pro

So what I do in some of my programs is to read the filenames from a directory and add the found filenames to a listbox. The user clicks on a name in the listbox and the file opens - in my case at the moment access databases. Is this the scenario you have in your mind?

Minimalist 96 Posting Pro

You only show a part of the sub. What does the rest of it look like?

Minimalist 96 Posting Pro

You need to take "Dim intSum As Integer = 0" out of the button click event, otherwise you always set it back to 0.

Minimalist 96 Posting Pro

@Mr.M
here is the output from your code. Also I don't know why you would insist on a mistake being correct? Have you tried to run it? I only feel sorry for the OP as her question got side tracked.

Minimalist 96 Posting Pro

@xuexue: If the loop only executes one time just see how often it executes if you put: For k = 0 To 4. If this works then there is something wrong with recno.Length.

@Mr.M
1) For k = 0 to recno.Tostring how is this supposed to work?

Minimalist 96 Posting Pro

O.K. I added some lines to automatically remove the wrong entry and move the cursor back to the end of the string in the textbox. Also select radiobutton1 form load.

Imports System.Text.RegularExpressions

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        RadioButton1.Checked = True
    End Sub
    Private Sub validatIn()
        If RadioButton1.Checked = True Then
            Dim regex As New Regex("^[0-9-]*$")
            If regex.IsMatch(TextBox1.Text) Then
                TextBox1.Text = TextBox1.Text
            Else
                MsgBox("Textbox1 only allows numbers and - ")
                If TextBox1.Text <> "" Then
                    TextBox1.Text = Trim(TextBox1.Text.Remove(TextBox1.Text.Length - 1))
                    TextBox1.SelectionStart = TextBox1.Text.Length
                End If
            End If
        End If

        If RadioButton2.Checked = True Then
            Dim regex As New Regex("^[A-Za-z.]*$")
            If regex.IsMatch(TextBox1.Text) Then
                TextBox1.Text = TextBox1.Text
            Else
                MsgBox("Textbox1 now only allows letters and .")
                If TextBox1.Text <> "" Then
                    TextBox1.Text = Trim(TextBox1.Text.Remove(TextBox1.Text.Length - 1))
                    TextBox1.SelectionStart = TextBox1.Text.Length
                End If
            End If
        End If
        If RadioButton3.Checked = True Then
            Dim regex As New Regex("^[A-Z]*$")
            If regex.IsMatch(TextBox1.Text) Then
                TextBox1.Text = TextBox1.Text
            Else
                MsgBox("Textbox1 now only allows Upper case letters")
                If TextBox1.Text <> "" Then
                    TextBox1.Text = Trim(TextBox1.Text.Remove(TextBox1.Text.Length - 1))
                    TextBox1.SelectionStart = TextBox1.Text.Length
                End If
            End If
        End If
    End Sub
    Private Sub cmdExit_Click(sender As Object, e As EventArgs) Handles cmdExit.Click
        Me.Close()
    End Sub
    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        validatIn()
    End Sub
End Class
Minimalist 96 Posting Pro

It is not very hard if you use regex. Not knowing if you have three textboxes or one, here is some code using one textbox and three radiobuttons to change validation of the input in textbox1.

Imports System.Text.RegularExpressions

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
    Private Sub validatIn()
        If RadioButton1.Checked = True Then
            Dim regex As New Regex("^[0-9-]*$")
            If regex.IsMatch(TextBox1.Text) Then
                TextBox1.Text = TextBox1.Text
            Else
                MsgBox("Textbox1 only allows numbers and - ")
            End If
        End If

        If RadioButton2.Checked = True Then
            Dim regex As New Regex("^[A-Za-z.]*$")
            If regex.IsMatch(TextBox1.Text) Then
                TextBox1.Text = TextBox1.Text
            Else
                MsgBox("Textbox1 now only allows letters and .")
            End If
        End If
                   If RadioButton3.Checked = True Then
            Dim regex As New Regex("^[A-Z]*$")
            If regex.IsMatch(TextBox1.Text) Then
                TextBox1.Text = TextBox1.Text
            Else
                MsgBox("Textbox1 now only allows Upper case letters")
            End If
        End If
    End Sub
    Private Sub cmdExit_Click(sender As Object, e As EventArgs) Handles cmdExit.Click
        Me.Close()
    End Sub
    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        validatIn()
    End Sub
End Class
ddanbe commented: Nice! +15
Minimalist 96 Posting Pro

You need to check which framework verions are installed on boths machines, and check for which cpu you have compiled your program. For the first part follow these instructions:
http://www.tech-recipes.com/rx/2959/what_version_net_framework_are_installed_pc/
for the second part you need to click on my project in solution explorer and go to the compile option.

Minimalist 96 Posting Pro

Your code modified would look like this.

 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Seatimage As New Windows.Forms.PictureBox()
        Me.Controls.Add(Seatimage)
        Seatimage.Name = "Seatimage"
        Seatimage.Location = New System.Drawing.Point(419, 134)
        Seatimage.AutoSize = True
        Seatimage.Size = New System.Drawing.Size(65, 23)
        Seatimage.ImageLocation = ("C:\Users\Harley\Desktop\Untitled.png")
        Seatimage.Image = Image.FromFile(System.IO.Path.Combine("C:\Users\Harley\Desktop\Untitled.png"))
        Seatimage.TabIndex = 4

    End Sub

Make sure you maximise your form as you will not see the picture if the form is too small.

Minimalist 96 Posting Pro

O.K. here is the very very basic code to add acontrol to the controls collection, in this case a picture box and load the image into it.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Seatimage As New Windows.Forms.PictureBox
        Me.Controls.Add(Seatimage)
        Seatimage.Image = Image.FromFile(System.IO.Path.Combine("C:\Users\Harley\Desktop\Untitled.png"))

    End Sub
Minimalist 96 Posting Pro

You might want to try this:

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Seatimage As New Windows.Forms.PictureBox
        Seatimage.AutoSize = True
         PictureBox1.Image = Image.FromFile(System.IO.Path.Combine("C:\Users\Harley\Desktop\Untitled.png"))
        Seatimage.TabIndex = 4
    End Sub

End Class
Minimalist 96 Posting Pro

I do think your logic is flawed. What happened if the third number is the same as the second and so on? You only test against the first.

Minimalist 96 Posting Pro

strTotal = Format(dblTotal.ToString("N")) and please read this:
http://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx#NFormatString

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

You generate the five numbers in the following way. First number generated you put in the first textbox and also you copy it in an array. 2nd number you put in the array and sort it. There are thre possibilities: <,> and =.
So you start off with: if it is equal, forget it and get the next number. If it is smaller,move it before the first number and and put it in the second textbox and so on. Once you have the five numbers compare the this sorted array to the one you have generated, sorted from the user input. If they match you are done other wise start over again in your loop.

Minimalist 96 Posting Pro

First off if you don't want to allow 0 to be generated you need to use this:
Dim value As Integer = CInt(Int((76 * Rnd()) + 1)).
Here is what I would do: Grab the numbers from the user,leave these in the textboxes but also copy them into an array and sort them there. Generate five random numbers out of the 75, put these into the other boxes and then copy them into another array - sort them there. If both arrays match leave them as they are in the textboxes, if they dont match clear the random array clear the textboxes and generate the next five numbers etc. Once the sorted boxes matcxh you are done, stop the timer and see how long it took.

Minimalist 96 Posting Pro

O.K. just a couple of points. A) The program you want to send a key combinations to need to be programmed to accept this combination. B) Windows always intercepts key presses and somewhat redirects these if the program you want to send these to doesn't accept these. So here is a small snippet using notepad to send keys to:

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Shell("notepad", vbNormalFocus)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        AppActivate("notepad")
        SendKeys.Send("text1")
        SendKeys.Send("{TAB}")
        SendKeys.Send("text2")
        SendKeys.Send("{TAB}")
        SendKeys.Send("{ENTER}")
        SendKeys.Send("^(a)") 'for Ctrl-A for select all
        SendKeys.Send("^(n)") 'create new notepad
        SendKeys.Send("^(s)") 'for control and S - save notepad
    End Sub
End Class
Minimalist 96 Posting Pro

O.K there are2ways of doing this. 1) create form 2 with exactly the same dimensions as form1 e.g. form2.width = form1.width etc. and in the same position, get thcoordianates of the mouse click and tranfer these to form1. 2) Use percentages to work out the distance from the top of form2 and the distance from the left side of form2 and transfer these to form1. In this case form1 can have different dimensions to form2 because you use percentages.

Minimalist 96 Posting Pro

You need to catch the close event like:

 Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) _
      Handles Me.FormClosing
        If e.CloseReason = CloseReason.UserClosing Then
            e.Cancel = True
            MsgBox("CLosing")
            Me.Hide()
        End If
    End Sub
savedlema commented: Thank you very much. Please see my comment +2
Minimalist 96 Posting Pro

O.K. You need to use a monospaced font which assigns each letter, number the same space, so an i would take up the same space as a w. Than you use the Rset function, where the number indecates how much you move your items to the right- depends on the width of the listbox. Here I post a few lines of code that demonstrates the use.

Private Sub Form_Load()
    List1.AddItem ("Hello")
    Dim strItem As String * 20
    RSet strItem = "Testing"
    List1.AddItem (strItem)
    Dim strItem1 As String * 10
    RSet strItem1 = "Testing"
    List1.AddItem (strItem1)
End Sub
Minimalist 96 Posting Pro

That is one way of doing it not knowing what you want to achieve:

    Dim array1(5) As Integer
    Dim array2(10) As Integer 'array2 is filled like(1,2,3,4,5,1,2,3,4,5}

Private Sub Form_Load()

    Dim i, j As Integer
    For i = 1 To 5
        array1(i) = i
    Next i
    For j = 1 To 5
        array2(j) = j
    Next j
End Sub

Private Sub Command1_Click()
    Dim k, l As Integer
    l = 0
    For k = 6 To 10
        l = l + 1
        array2(k) = array1(l)
    Next k
    For i = 1 To 10
        Debug.Print (array2(i))
    Next i
End Sub
Minimalist 96 Posting Pro

You are mixing up doubles and integers, also use val(me.text1) etc. like:

Option Compare Database
Dim number1 As Double
Dim number2 As Double
Private Sub cmd1_Click()
 MsgBox "The largest number is " & FindLargestNumber(val(Me.text1), val(Me.text2))
End Sub
Public Function FindLargestNumber(number1, number2) As Double
  If number1 > number2 Then
     FindLargestNumber = number1
  ElseIf number2 > number1 Then
     FindLargestNumber = number2
  End If
End Function
Minimalist 96 Posting Pro

I don't think you will find a lot of code performing heuristic
analysis. The reason is that this is used by anti virus companies, patented and copy righted. See the link here:
http://www.google.nl/patents/US7480683
There are some other articels that might interest you as well:
http://www.symantec.com/connect/articles/building-anti-virus-engine
With this one coming sort in the direction you are investigating:
http://www.thescarms.com/dotnet/FileSysWatcher.aspx
You want to check out the filesystem watcher at ms:
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.created(v=vs.110).aspx
which looks like a good starting point. If you want to list all of the threads running on your computer this bit of code will do it:

 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim psList() As Process
        Try
            psList = Process.GetProcesses()

            For Each p As Process In psList
                Console.WriteLine(p.Id.ToString() + " " + p.ProcessName)
            Next p

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        End Try
    End Sub
Minimalist 96 Posting Pro

Your first check should be to see if the matrix is square or not because only square matrices can also be diagonal matrices. Once you have determined that the matrix is square you than can start iterating through the elements to see if they are of value 0 or not. Only the elements a11 a22 a33 etc should be not equal to 0. You might also check out this link:
http://www.extremeoptimization.com/QuickStart/
last part there which deals with matrices. Interesting there is the part of triangular matrices lower and upper which are playing into the diagonal matrices. I will keep checking these post to see how you are progressing.
Good luck

Minimalist 96 Posting Pro

So this is what you can do: Declare 6 Integer variables like: hour1,min1,sec1 and three more Integer varaibles hour2,min2,sec2. Take your first string from your text. Split it into three parts and convert these to Integers and store these in your first three Integers. Grab the next text, do the same but store these in the second lot of varaibles. Compare the hours, and if needed the minutes and seconds and either replace the first lot with the second or load the next lot into the second lot of variables - compare again until you have reached the end of your text file and diplay the stored numbers from the first three varaibles as these should be now the lowest.

Minimalist 96 Posting Pro

Here you find a lengthy article about some of these eroors and how to fix these. Good luck
http://pcsupport.about.com/od/findbyerrormessage/a/mmsystem-dll-not-found-missing-error.htm

Minimalist 96 Posting Pro

You will find an example with explanations here:
http://support.microsoft.com/kb/118377

Minimalist 96 Posting Pro

O.K. You can't just have one button to do the backup and restore at the same time. This doesn't make sense. So you need either 2 buttons, one to backup and one to restore or set a flag with a radiobutton or something else.
OK. this what I do: At the first use of my program I createall the databases and folders the program needs. So on first run I create the backup folder:

Case 14 'create the backupfolder on first run of the program
                My.Computer.FileSystem.CreateDirectory(mypath & "\" & constfoldername & "\" & "Backups") 'create workingfolder in th app directory
                InClass.Label7.Text = "Created Backup Folder"

When it comes to backing files up I first create a folder with todays date and then copy the files the user wants to back up into this folder:

Case 15 'create the backup files
                Dim st As String
                st = Now.ToString("D")

                If My.Computer.FileSystem.DirectoryExists(mypath & "\" & constfoldername & "\" & "Backups" & "\" & st) = False Then
                    My.Computer.FileSystem.CreateDirectory(mypath & "\" & constfoldername & "\" & "Backups" & "\" & st)
                End If

                If My.Computer.FileSystem.FileExists(mypath & "\" & constfoldername & "\" & "Globals" & "\" & "Forms.txt") Then
                    My.Computer.FileSystem.CopyFile(mypath & "\" & constfoldername & "\" & "Globals" & "\" & "Forms.txt", mypath & "\" & constfoldername & "\" & "Backups" & "\" & st & "\" & "Forms.txt", True)
                End If
Ancient Dragon commented: right +14
Minimalist 96 Posting Pro
Private Sub Command1_Click()
Picture1.Line (200, 0)-(200, Picture1.Height), vbBlue
Picture1.Line (500, 0)-(500, Picture1.Height), vbBlack

End Sub

Private Sub Form_Load()
    Picture1.DrawWidth = 5
End Sub
Minimalist 96 Posting Pro

O.K I didn't undestand what your code is doing, considering what you want to achieve. So I whipped up a small program to do more or less what you waanted initiallyb but there is still more work to do. Since I have not yout file I just created the list.
1) You just nedd to replace in the form load your file with my construction. I don't understand why you split the text there. I also added another textfield to the line where you can put a count in to check how often the question has been answered.
2)If you have commatas in your text use another deliminator.
3) As you will see I remove everey line from the list to avoid having to check the random numbers, I use these to retrieve text based on the index and add these later back to the list after use.
You can copy the code directly into a new project - 3 radiobuttons, 1 label ,1 button.

Imports System
Imports System.Collections.Generic
Imports System.Text
'Imports System.IO
Public Class Form1
    Dim TestMe As New List(Of String)
    Dim intCorr As Integer
    Dim str1 As String
    Dim parts1(2) As String
    Dim strBack As String = ""
    Dim strTest As String = ""
    Dim num As Integer
    Dim workStr As String = ""
    Dim clickflag As Integer = 0
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim iCount As Integer = 0
        Dim str As String = ""

        For …
Minimalist 96 Posting Pro

Well that would take too long. Look at the imports. Look what you need to put into the eventhandlers and what the events are.Example: Detect on the label that the mouse has entered the region occupied by the label and is ready to drop and so on. You can also google each part of the events and will find out trhat also put it all together by googling. Good luck and don't forget to mark it as solved. Thanks

Minimalist 96 Posting Pro

O.K. You got the addhandler and an event. There is more to it. I have whipped up some minimal code you can start a new project,copy it in, put a button on the form, option strict = off - otherise you will get late binding errors, otherwise the code will work (VB.net express 13)

Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Text
Public Class Form1
    Dim lbl As Label
    Dim flag As Integer = 0
    Dim i As Integer = 50
    Dim dragging As Boolean
    Dim beginX, beginY As Integer
    Dim counter As Integer = 1
    Private ptX, ptY As Integer
    Private drag As Boolean
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


        Dim lbl As New Label

        lbl.Name = "Label" & counter
        lbl.Text = lbl.Name
        lbl.Size = New Size(80, 20)

        lbl.Location = New Point(80, counter * 22)


        AddHandler lbl.Click, AddressOf labMouseClick
        AddHandler lbl.DragEnter, AddressOf labDragEnter
        AddHandler lbl.MouseDown, AddressOf labMouseDown
        AddHandler lbl.DragDrop, AddressOf labDragDrop
        AddHandler lbl.MouseUp, AddressOf labMouseUp
        AddHandler lbl.MouseMove, AddressOf labMouseMove
        Me.Controls.Add(lbl)

        counter += 1
    End Sub
    Private Sub labMouseMove(lbl As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
        If drag Then
            lbl.Location = New Point(lbl.Location.X + e.X - ptX, lbl.Location.Y + e.Y - ptY)
            Me.Refresh()
        End If
    End Sub
    Private Sub labDragDrop(sender As Object, e As DragEventArgs)
        e.Effect = DragDropEffects.Move
        Static mousePosX As Single, mousePosY As Single
        lbl.Left = lbl.Left + (e.X - mousePosX)
        lbl.Top = lbl.Top + (e.Y - mousePosY)
    End Sub
    Private Sub labMouseUp(ByVal …
oussama_1 commented: exactly +3
Minimalist 96 Posting Pro

Static x As Integer = 100 or whatever

Minimalist 96 Posting Pro
 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim intSum As Integer = 0
        Dim Int1 As Integer = CInt(NumericUpDown1.Value)
        Dim Int2 As Integer = CInt(NumericUpDown2.Value)
        TextBox1.Text = CStr((Int1) + (Int2))
    End Sub
Minimalist 96 Posting Pro

check this info out. At the bottom is an example of how to use the toolstriptextbox:
http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstriptextbox(v=vs.110).aspx

Minimalist 96 Posting Pro

O.K., using the examples from vb.net it is very easy to format columns, but you need to set the font of the combobox to a mono spaced font. I used Courier New. This is all the code you need:

Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim str1 As String = "WWWWWWWWWWWWWWW"
        Dim str2 As String = "Window"
        Dim str3 As String = "OnceAndTwice"
        Dim str4 As String = "Hello"
        Dim str5 As String = "one"
        Dim str6 As String = "Onehundredthousand"
        Dim format As String = "{0,-20} {1,-20} {2,-20}"
        Dim line1 As String = String.Format(format, str1, str2, str3)
        Dim line2 As String = String.Format(format, str5, str6, str2)
        Dim line3 As String = String.Format(format, str3, str5, str1)

        ComboBox1.Items.Add(line1)
        ComboBox1.Items.Add(line2)
        ComboBox1.Items.Add(line3)
    End Sub
End Class

andtheresult looks like on the jpeg.

Minimalist 96 Posting Pro

If your code worked well in vb6 than it means you would have used a mono spaced font, otherwise you would not have been able to line colums as you would like? A mono spaced font gives the same space to every charcter, that means a "W" takes as much space as an "I". In not mono spaced fonts these charcters take up different space and you won't be able to line up the text exactly. Check out the vbTab function: Dim text As String = "abc".Insert(1, vbTab) or check out the more modern way here:
http://msmvps.com/blogs/deborahk/archive/2009/07/21/formatting-text-files.aspx
http://www.dotnetperls.com/string-format-vbnet
If this doen't help I will write a small project and check it out.

Minimalist 96 Posting Pro

Position 25 is either the last letter of the first string or an empty space. Starting with the next string at position 25 gives you either the last letter of the first string or string2 starts with an empty space. So before you work out the length of your strings use Trim(text1) and Trim(text2) to get rid of empty spaces or start text2 t position 26.

Minimalist 96 Posting Pro

closer compared to what?

Minimalist 96 Posting Pro

First you should clear your combo:
CmbBank.Items.clear
Than you build your string:

str = ((DS.Tables("Deposit").Rows(Iint).Item("Bank")) & " " & DS.Tables("Deposit").Rows(Iint).Item("Acno"))

than you add this to your combo:

CmbBank.Items.Add(str)

Also I would think about to use the split string method instead of using Left() and Mid() functions. To the length of your strings - 25, 5 I can't say anything because I don't know the text that is in there. Left(text,25) returns the first 25 characters of the text and Mid(text,25,17) is wrong.

Minimalist 96 Posting Pro

Obviously you just can't post my code into ypur program. You need to modify it so it does suit your databse. O.K. I give it shot. If it works it will only return one column which shoiuld be printed in zhe direct window with the debug.print command. This is a great help to debug and to see from where your progam goes wrong. Alos remember the .item(0).item(1).item(2) etc.

Dim CN As New OleDb.OleDbConnection
 Dim DBProvider As String
 Dim DBSource As String
 Dim DS As New DataSet
 Dim DA As OleDb.OleDbDataAdapter
 Dim SQL As String
 DBProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
 DBSource = "Data Source=C:\Users\bennet\Documents\Visual Studio 2012\Projects\MavDeposit\MavDeposit\Deposit.mdb"
 CN.ConnectionString = DBProvider & DBSource
 CN.Open()
 SQL = "SELECT Bank,Acno from Receipts"
 DA = New OleDb.OleDbDataAdapter(SQL, CN)
 DA.Fill(DS)
 DA.dispose
 CN.close
 Dim Iint as Integer = 0
 Dim str as String
 If TxtMode.Text = "A" Then
 For Iint = 0 to ds.Tables(0).Rows.Count - 1
 str= Trim(Cstr(DS.Tables(0).Rows(Iint).Item(0)))
 'CmbBank.Items.Add(DS.Tables(0).Rows(Iint).Item(0))
 Debug.Print(str)
 Next
 End If

are your columns in the record

Minimalist 96 Posting Pro

Additional info: The addhandler handles events during runtime for my labels I have created during runtime. See also the following link:
http://msdn.microsoft.com/en-us/library/7taxzxka.aspx

Minimalist 96 Posting Pro

Thats how I handle some of the Addhanlers:

AddHandler lab.Click, AddressOf labMouseClick
                    AddHandler lab.DragEnter, AddressOf labDragEnter
                    AddHandler lab.MouseDown, AddressOf labMouseDown
                    AddHandler lab.DragDrop, AddressOf labDragDrop
                    AddHandler lab.MouseUp, AddressOf labMouseUp
                    AddHandler lab.MouseMove, AddressOf labMouseMove
                    Me.Controls.Add(lab)
Minimalist 96 Posting Pro

O.K here are 2 different approaches: The first from the last link:

Dim rdr As OleDbDataReader = cmd.ExecuteReader()
        Do While rdr.Read
            lvwResults.Items.Add(New ListViewItem({rdr("au_lname"), rdr("au_fname"), rdr("phone")}))
        Loop

and the other I am using at the moment:

 oledbAdapter.SelectCommand = New OleDb.OleDbCommand(statement.CommandText, conn)
            oledbAdapter.Fill(ds)
            oledbAdapter.Dispose()
            conn.Close() 'only retruns blocknames

                For i = 0 To ds.Tables(0).Rows.Count - 1
                    str = CStr((ds.Tables(0).Rows(i).Item(0)))
                    TBlocks.ComboBox1.Items.Add(str)
                Next
Minimalist 96 Posting Pro

Well, try the same loop as before and see if it works.

Minimalist 96 Posting Pro

You do need to learn the syntax of the net framework. Here is good start of how to handle the combobox methods:
http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox(v=vs.110).aspx

Minimalist 96 Posting Pro

This might be what you are looking for:
http://vbcity.com/forums/t/103763.aspx

adam.wolnikowski.9 commented: Exactly what I'm looking for, but again, outdated...I guess I'm going to have to translate that code to 2013. +0
Minimalist 96 Posting Pro

I don't think my advise was any good with your queries. Better have look at:
http://technet.microsoft.com/en-us/library/cc966377.aspx
and take it from there.

Minimalist 96 Posting Pro

Well, do you know what is returned?

Minimalist 96 Posting Pro

Well I would put some error checking in. After each select statement use debug.print() to see if your selects return what you expect. MAybe googlee for some select statement code and compare this to what you've got becxause I don't think you got it correct.