Compare Two StringCollections?
Jun 12, 2009Is there a way to compare two variables that are StringCollections to find out if they both contain the same data or not?
View 3 RepliesIs there a way to compare two variables that are StringCollections to find out if they both contain the same data or not?
View 3 RepliesTo use StringCollections instead of String Arrays for My.Settings. I've opened a file and have this:
CODE:
But I error on line 2, saying "Object Reference not set in Instance of an Object". So then, I try to use New before I go Into the loop: My.Settings.Trunk = New System.Collections.Specialized.StringCollection
But then i get "index outside bounds of array" still on line 2. This is weird to me. Is it because my StringCollection doesn't have an array size? If so how do i declare an array size for this? Or is this just so totally different from String Arrays?
I have two textbox in my application.
Textbox1.Text="19-Jan-2010"
Textbox2.Text="Jan 2010"
May I know how can I compare that Textbox1 and Textbox2 text is within same month and same year?
they need to make some compare version between host version and client version.. and each 1 version different will download the file to the client..[URL]..with both example, how can i make a program in VB.NET just like i said just now?
View 15 Repliesi need to make sure a labels.text and a labels2.name are equal. figured it was straight forward i renamed the label the same name as the label im comparing it too but it comes up false.
View 1 RepliesWe would like to compare a date from the db with current date. Here is what I have tried so far: 'Obtain current date Dim curdate As String = Now.ToString("yyyy") 'Now compare curdate with date from db called eventdate. Event date is of dateTime datatype. If drv("eventdate").ToString = "" And Year(drv("eventdate").ToString) = curdate Then
[Code]...
I have 2 date ranges with 2 text box, based on that m populating reports.
I want to do in such a way if fromdate and todate <27/06/2009 then it should call come other SP otherwise diff one
[Code]....
Okay what i what to do is to compare one picture to another continuously untill it finds a change and then launches my code. Picture 1 - A picture i put to the form Picture 2 - I wont this to take a picture in a certain area and compare it to the first picture. lets say the first screen shot it took didn't match 'Picture 1' then it will keep taking pictures until it finds something different and when it finds something different it will launch my code.
I dont know if this is the right way to go since i heard something about pixel scanning but that's to hard since you have to find the exact RGB of that pixel. Also theirs like billions on the screen so it would be hard to find a change of color on the screen and then launch a code after that and keep repeating.
I am working on my program as I have created picturebox1 and splitter1 in my program. I am coding on the if statement as I am trying to compare on the value that if they are less than 184, then do something.
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
If Splitter1.Location <= New System.Drawing.Point(184, 0) Then
[Code]....
I know that I can't compare the value using with <= which I will only have to use = instead of <=, but i still want to compare with the value that if it less than 184, then do something.
I just put 2 datagridview in form1 and both datagridview got filename and MD5 hash. but some data in datagridview1 and datagridview2 got different MD5 hash but same filename.. but how can i compare both MD5 hash and put it into another datagridview (datagridview3)
View 5 Replies[Code]in my program, i've created a function wherein i will get the min timeentry for type 0 and it depends on the current date. so heres how it goes [Code] what should i put as the value of time entry? i tried format(var,"m") but no success. in the code i post above it also does not work. i get this error "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value." how can i match the value in the database and the current date so that i can retrieve a value?
View 2 RepliesI have a source image and another image. I am wanting to compare the two images and tell me if they are the same.
View 3 RepliesI'm trying to compare values from a single xml file. Here is my xml file set up
<?xml version="1.0" encoding="utf-8"?>
<Updater>
<version>
<corever>0.12</corever>
<soundver>2.21</soundver>
<gfxver>.0.31</gfxver>
[Code]...
What is not working is CompareVersion Sub. Not sure if its even possible, I looked through google and couldn't find anything.
I NEED TO COMPARE 6 NUMBERS from 6 TEXTBOXES with 35 random generated numbers here is what i got:
Dim N(5) As Integer
N(0) = Val(TextBox1.Text)
N(1) = Val(TextBox2.Text)
[code].....
I am experienced with Visual Basic, and currently working on a project using VB 2008. I am struggling to come up with a code that compares one sentence to three other sentences. For the input could be a simple textbox and the output being the most probable sentence (and the probability if possible).
View 6 RepliesI have got a problem with my program as they are extract the whole html tags when I am trying to compare between two tags "<p id='mystrings1'> and the <span id="mystrings2">Enabled">". What I want my program to do is to find the tags in the php source called mystrings1 to see if they does exist then find the tags called mystrings2 with value "enabled" on the same line as the mystrings1 for each matches, then extract the mystrings1 value.On my program, it reads the whole tags like this:
<p id='mystrings1'>user data 1</p><p id="images"> <a href="images.php?id=1">Images</a></td> | <a
href="http://myhotlink.com">Link</a> </td> | <a href="delete.php?id=1">Delete</a> </td> | <span id="mystrings2">Enabled</td>
Here's the form
Public Sub timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
timer1.Enabled = False
timer1.Stop()[code]....
how i can compare the tags between mystrings1 and mystrings2 with value "enabled" to see if it have found the matches, then display the messagebox with the mystrings1 value?
I'm trying to compare values from a single xml file.
Here is my xml file set up
<?xml version="1.0" encoding="utf-8"?>
<Updater>
<version>
[Code].....
i want to compare the two data table columns and find duplicates
for example
dataTable1
autoid ponbr polinenbr quantity
[code].....
I have two rich text boxes.I have to compare both the text boxes and highlight it, if any difference is there.Which is similar like compare and merge option in msword.How can i do it in vb.net(vs2005)?
View 2 Repliescompare two strings is equalto and remove element in both and get remaining element string using vb.net
View 2 RepliesI would like to know how to compare two tables which are in a datagridview each one. I imported one from excel and the other one from sql, i want to add the info that is in each cell of excel's table in sql table..though i don't want to have duplicated data.I want to do something like this
'datagridview1=exceldv
'datagridview2= sqldv
for each item1 in exceldv
for each item2 in sqldv
[code]....
It's been a long time and I'm very rusty on my VB.
I did something like this years ago and now I'm stumped.
My application flows like this-
-From my form, I have a text box.
-I scan a serial number into the text box
-The application compares the scanned serial number against a base-line serial number
-Depending on if the serial number is greater, less or equal, a windows messege box is displayed.
I can get the messeage box to work just fine, it's just the line of code that does all the comparision I'm struggling with.
- Serial number to baseline is something like SY1420000134 (all the same charater length and always starts with a SY)
I've been searching for about two hours now and can't find any thread to jog my memory.
i create a arry like :
Dim DetailsList As New List(Of entInvoiceDetails)
where contain BookId
i need to compare BookId when i add a new BookId
Im trying to get a text box the compare its self to more than 1 other ive tried to do it like this :
If TextBox7.Text = TextBox1.Text Or TextBox2.Text Or TextBox3.Text Or TextBox4 Or TextBox5.Text Or TextBox6.Text Then
How to compare DateTimePicker1 with DateTimePicker2?For example i wanted DateTimePicker1 must always be smaller than DateTimePicker2...
example
DateTimePicker1 > DateTimePicker2
'display message box error
Public Class File_Compare
Inherits System.Windows.Forms.Form
Private Dir1, Dir2 As String
[code].....
just putting the finishing touches on my booking application Basically when the user submits a booking i want to check with the SQL database that the room isn't already booked for that time. heres the code im using to book a room at the moment
[Code]...
tried 2 of projects on this forum to compare images. I need to compare these two images
View 17 RepliesI am working on my work here and I am not sure how to proceed. I am to write a program that has 3 labels with names in one and a number in the other then the program is supposed to output who is in first second and then third. I am not sure if I am to use an if statement or a case statement. I assumed a case but it was a lot of code that didnt work, I had if time 1 was > than time 2 then a second case if time 1 > time 3 and do that all over again if time 2 > time 1 and so on.
View 6 RepliesI'm currently working on an application witch takes two images and comparing them on how equal they are.I want it to display in "%" how equal the pictures are.
Like:
Picture 1 (orginal) - Picture 2 (Edited)
The picture is 67% equal