Minimalist 96 Posting Pro

Well you would have to put some code in to make it not case sensetive - I need to think about this. To the second point, the bclear button clears all the non selectred items in the list box and I can compare in the developing state that I get exactly the same words that are highlighted. You can remove this and vou can put the code for removing non selected items somewhre else. But why did you wanted all your words in the listbox? You could have moved only the matching words as in the textbox and you wouldn't need to highlight and than remove. I am not clear about this.

Minimalist 96 Posting Pro

Thats what the picture looks like sfter I pt an o into the input textbox:

Minimalist 96 Posting Pro

O.K. I got it working, however it distinguishes between captal and non capital letters. I put 2 buttons, one to load your list into the listbox and one to remove non highlihted words - which gives the same results as in the multiline textbox.
Here is the whole code:

Imports System.IO
Public Class Form1
    'Declaration
    Public Property AutoCompleteMode As AutoCompleteMode
    Public MySource As New AutoCompleteStringCollection()
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        MySource.AddRange(New String() _
                            { _
                                "January", "Joke", "James", "Joy", _
                                "February", _
                                "March", _
                                "April", _
                                "May", _
                                "June", _
                                "July", _
                                "August", _
                                "September", _
                                "October", _
                                "November", _
                                "December" _
                            })
        ' Initialize the text box. 
        TextBox1.AutoCompleteCustomSource = MySource
        'TextBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        TextBox1.AutoCompleteSource = AutoCompleteSource.CustomSource

    End Sub

    Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp
        Dim strOr As String, strReturn As String
        strOr = Trim(TextBox1.Text)
        TextBox2.Text = ""
        ListBox1.ClearSelected()
        For Each value As String In MySource
            'strLastName = Mid( StrFullName, Instr(strFullName, " "))
            If InStr(value, strOr) > 0 And strOr <> "" Then
                'strReturn = Mid(value, InStr(value, strOr))
                strReturn = value
                TextBox2.Text = TextBox2.Text & strReturn & vbNewLine
                ' put code for highlighting here
                Dim ind As Integer = ListBox1.FindString(strReturn)
                If ind <> -1 Then
                    ListBox1.SetSelected(ind, True)
                End If
            End If
        Next
    End Sub

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim theLsect As String
        theLsect = Nothing
        Dim itemList As New List(Of String) …
Minimalist 96 Posting Pro

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\bin\Debug\bookshop.mdb" shoulds be like this:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\bookshop.mdb"

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

In the documentation for source it says:
Data Source = |DataDirectory|\Mydb.mdb
so if I look at your connection string you still have directory references in the path which is not allowed.Click Here

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

You get this error because your button names are different from from the construction in the addhandler statement. Read Reverend Jim's statement carefully

Minimalist 96 Posting Pro

It looks to me that in line 9 you want to connect if the passwords are wrong? Check your if--then--else statement

Minimalist 96 Posting Pro

I have used as selection mode "multi simple" - maybe try this and let me know

Minimalist 96 Posting Pro

You need to set your listbox in the properties window to multiselect and and select each item with a match that matches.

Minimalist 96 Posting Pro

Here are some code examples side by side vb6 and vb.net 8
http://msdn.microsoft.com/en-us/library/zzt5x46b(v=vs.90).aspx

Minimalist 96 Posting Pro

Here is just some basic code. Add items in formload. When an item is clicked in listview1 it is copied totextbox1. Where I copy the text you have to insert the code you need.

Public Class Form1

    Private Sub ListView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListView1.SelectedIndexChanged
        Dim IntInd As Integer = ListView1.FocusedItem.Index
        TextBox1.Text = ListView1.Items(ListView1.FocusedItem.Index).SubItems(0).Text()
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ListView1.Items.Add("Hello1")
        ListView1.Items.Add("Hello2")
    End Sub
End Class
Minimalist 96 Posting Pro

O.K- create a command button
You need the location and the filename of the file you want to copy. You need a location where you want it copy to and you need to give a filename.

Private Sub Command1_Click()
FileCopy "C:\1.txt", "C:\Folder1\2.txt"
End Sub

here you can see that c:\ is the source directory
1.txt is the filename that get copied to c:\ directory into folder Folder1 as file 2.text

Minimalist 96 Posting Pro

Dim SourceFile, DestinationFile As String
SourceFile = "SRCFILE" ' Define source file name.
DestinationFile = "DESTFILE" ' Define target file name.
FileCopy(SourceFile, DestinationFile) ' Copy source to target.

Also show us the code you are using

Minimalist 96 Posting Pro

O.K. as I said the first attempt was just a guess and a hangover from vb6.
ListBox1.ListCount becomes listbox.items.count, however we need to use the a list to add all the selected items, move these into an array, clear the listbox and add the selected items back into the listbox. I put the code to do this in a button I added to the form

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim theLsect As String
        theLsect = Nothing

        Dim itemList As New List(Of String)
        For Each s As String In ListBox1.SelectedItems
            itemList.Add(s)
        Next
        Dim itemArr() As String = itemList.ToArray
        Dim SectionArray() As String = itemArr
        ListBox1.Items.Clear()
        For Each s As String In itemArr
            ListBox1.Items.Add(s)
        Next
    End Sub
Minimalist 96 Posting Pro

Please check out this link:
Click Here

Minimalist 96 Posting Pro

I think I just thought of better waydoing what you want. May be before each search clear the listbox and than do the new search so you only have the newest st of wor matches in the listbox.

Minimalist 96 Posting Pro

O.K. take it step by step: after you highlight all the matching words in your program you delete the not highlighted words. The following code is just highly guessing.

Dim I As Integer
    For I = Me.ListBox1.ListCount - 1 To 0 Step -1
        If Not(Me.ListBox1.Selected(I)) Then
            Me.ListBox1.RemoveItem (I)
        End If
    Next
Minimalist 96 Posting Pro

Assuming you have loaded doem the common control pack from Microsoft, you add the slider to your form, you go to the slide controls properties and change the orientation. Otherwise have a look at this link Click Here

Minimalist 96 Posting Pro

Where do you want the words disappear? Listbox? Textbox?

Minimalist 96 Posting Pro

FileSystemObject.CopyFile "c:\mydocuments\letters\ *.doc", "c:\tempfolder\" Click Here

Minimalist 96 Posting Pro

The OP's code comes directly from here:
http://www.tutorialspoint.com/vb.net/vb.net_exception_handling.htm
where also is clearly stated:
an exception is a problem that arises during the execution of a program. An exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero.

Exceptions provide a way to transfer control from one part of a program to another. VB.Net exception handling is built upon four keywords: Try, Catch, Finally and Throw.
and:
You can also define your own exception. User-defined exception classes are derived from the ApplicationException class. The following example demonstrates this:OP's code
and you can find every bit on the ApplicationException Class here

Minimalist 96 Posting Pro

You have at the beginning:

Dim RFile(3) As String which is an array that should hold 3 elements.
But You are trying to put 4 elements in:
For I = 0 To 3
Input #1, RFile(I) (****Here is the problem****)
because you go 0,1,2,3

Minimalist 96 Posting Pro

O.K. here we go for vb6

Private Sub Form_Load()
Text1 = ""
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
  If Not IsNumeric(Text1.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
  KeyAscii = 0
  MsgBox ("Not a Number")
  End If
End Sub
Minimalist 96 Posting Pro
 Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim str As String = Trim(TextBox1.Text)
        If Not Regex.Match(str, "^[0-9]*$", RegexOptions.IgnoreCase).Success Then
            MsgBox("Please enter Numbers text only.")
        Else
            MsgBox("O.K")
        End If
    End Sub

Sorry this was forvb.net

Minimalist 96 Posting Pro

This will probably work:

Dim strFile, strData As String
Dim ln As Integer
Dim Reader As New System.IO.StreamReader(strFile)

    Do
      strData = Reader.ReadLine()
        ln = strData.Length
           If Mid(strData, 1, 1) = "A" And Mid(strData, ln, ln) = "0" Then
             strData = Mid(strData, 1, ln - 1) & " Replace with this"
             RichTextBox1.Text = RichTextBox1.Text & vbNewLine & strData
           End If

    Loop Until strData Is Nothing
AnooooPower commented: untested but thanks i went with oussama's :D +0
Minimalist 96 Posting Pro

Once a picture is placed in the picture box it has no memory where it came from or what its name is. What you can do is using the tag property of the picture box.Something like:

Picture1(i) = LoadPicture(App.Path & "/ms1.jpg")
Picture1(i).Tag=Filename

This way you can refere to the tag property to get he picture name that is in the picture box

Minimalist 96 Posting Pro

When dimensioning your variables put all the database stuff you need into the event where you need it.

Minimalist 96 Posting Pro

I think the Dim statements in the module don't work like this. You need to dim the databse stuff in the event where you are using them. Also put your error msg into google and you will most likely find some explanation.

Minimalist 96 Posting Pro

Your dim statements are out of the button click event.I also can't seew here you open the connection. You would perform these steps:

 'Define connection string
 oConnect=
 'Define the query
   oQuery =
   'Instantiate the connectors
    oConn = New OleDbConnection(oConnect)
    oComm = New OleDbCommand(oQuery, oConn)
    'Open the connection
     oConn.Open()
     'Perform the Non-Query
      oComm.ExecuteNonQuery()
      'Close the connection
       oConn.Close()
Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

O.K. here a re twopictures, one in design mode the other when the application is running. There 2 pictureboxes red andblue and one oval shape yellow. The picture can be moved at run time only when grabbing the red part, that's where I put some code in.

Public Class Form1
    Dim AppLoc, CurLoc As New Point(0, 0)
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
    Private Sub Synchro()
        AppLoc = Me.Location
        CurLoc = Cursor.Position
    End Sub
    Private Sub PictureBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseDown
        Timer1.Enabled = True
        Timer1.Start()
        Synchro()
    End Sub
    Private Sub PictureBox1_MouseUp(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseUp
        Timer1.Stop()
        Synchro()
    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        Me.Location = AppLoc - CurLoc + Cursor.Position
        Synchro()
    End Sub
End Class
Minimalist 96 Posting Pro

You have to modify it as you need it. I put a second textbox and sat it to multiline

Public Class Form1
    'Declaration
    Public Property AutoCompleteMode As AutoCompleteMode
    Public MySource As New AutoCompleteStringCollection()
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ' Create the list to use as the custom source. 

        MySource.AddRange(New String() _
                            { _
                                "January", "Joke", "James", "Joy", _
                                "February", _
                                "March", _
                                "April", _
                                "May", _
                                "June", _
                                "July", _
                                "August", _
                                "September", _
                                "October", _
                                "November", _
                                "December" _
                            })
        ' Initialize the text box. 
        TextBox1.AutoCompleteCustomSource = MySource
        'TextBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        TextBox1.AutoCompleteSource = AutoCompleteSource.CustomSource

    End Sub

    Private Sub TextBox1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyUp
        Dim strOr As String, strReturn As String
        strOr = Trim(TextBox1.Text)
        TextBox2.Text = ""
        For Each value As String In MySource
            'strLastName = Mid( StrFullName, Instr(strFullName, " "))
            If InStr(value, strOr) > 0 And strOr <> "" Then
                'strReturn = Mid(value, InStr(value, strOr))
                strReturn = value
                Debug.Print(strReturn)
                TextBox2.Text = TextBox2.Text & strReturn & vbNewLine
            End If

        Next
    End Sub

    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

    End Sub
End Class
Minimalist 96 Posting Pro

I think that vb.net doesn't install activex controls but net controls. So you might have used some activex control from vb6. VB6 installed these controls and registered these in the system using its installer and registration key. Try to install vb6 on the other computer and see if this works.

Minimalist 96 Posting Pro

Following your posts I guess you want to have a keylogger that does something when a keycombination is pressed. I would like to hate using a worprocessor and a keycombination and something unexpectedly pops up. This is just a guess on your other posts regarding catching keypress events, installing exe files without a user noticing etc. I hope your program never lands on my computer!

Minimalist 96 Posting Pro

set the borderstyle of your form to none and play around with the opacity

Minimalist 96 Posting Pro

Dim bal As Integer() =( 1000,2,3,17,50) should probably be

bal As Integer() ={1000,2,3,17,50}

the third error occured because of above
http://msdn.microsoft.com/en-us/library/wak0wfyt.aspx#BKMK_ArrayElements

Minimalist 96 Posting Pro

Well, in this you can analyze the installation scripts and find the differences.

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

Which program are you using to make the setup file?
Also make sure you are not trying to load a file during startup, referencing a file from form load that doesn't exist yet.

Minimalist 96 Posting Pro

There are lots of examples on the net. Here are good starters:
http://www.w3schools.com/sql/sql_alter.asp
http://www.techonthenet.com/sql/tables/alter_table.php

Minimalist 96 Posting Pro

Also check that both machines are running the same framwork version.

Minimalist 96 Posting Pro

What do you use? Adox, SQL, Access. To help you you need to more specific.

Minimalist 96 Posting Pro

Dim marks() As Integer ' declares an one dimensional array to hold integer
ReDim marks(2) ' inialises the array to hold 3 integers at indecies (0) (1) ans (2)
If one needs to hold more integers and doesn want to loose the ones that have been entered already then one uses
ReDim Preserve marks(10)' which now can hold 11 intgers 0 to 10 and preservesthe ones already enterd
http://www.tutorialspoint.com/vb.net/vb.net_arrays.htm

Minimalist 96 Posting Pro

Even so it is a very simple method to print a form it takes some code to get it right.The reason is the DPI of your monitor and the scale of the paper you are using. Here is a link that will show you hoe to do it:
http://support.microsoft.com/kb/230502/en-us

Minimalist 96 Posting Pro

I don't think you are allowed to send .exe files via email. That's why all of them are zipped.

Minimalist 96 Posting Pro
Minimalist 96 Posting Pro

This will also work:
Dim byDay As Integer = CInt(Trim(txtByday.Text))
but read the article on conversion
http://www.owenpellegrin.com/articles/vb-net/converting-strings-to-numbers/

Pickletronic commented: nice, thanks +0
Minimalist 96 Posting Pro

Maybe use this:

        byHour = CInt(Val(Trim(txtByhour.Text)))
        byDay = CInt(Val(Trim(txtByday.Text)))
Pickletronic commented: It works +0