I want to test if an image in a picturebox is the same to another image in a picturebox?Also, i get my images from a listBox.I need to use i as a conditional in an if statement.
If (picBox2.Image = picBox1.Image) Then
' code ...
EndIf
I'm looking into adding some unit tests for some classes in my data access layer and I'm looking at an update routine that has no return value.It simply updates a row based on the id you provide at whichever column name you provide.Inside of this method, we collect the parameters and pass them to a helper routine which calls the stored procedure to update the table.Is there a recommended approach for how to do unit testing in such a scenario?
I use VS team system 2008. At the moment i need to test some business classes, i have found two kinds testing NUnit and the unit testing provided by the VS team system. what are there differences?
In the following LINQ query, i would like when the Loc=Locale.Gr all the records with GrID=100 returned and when the Loc is anything else all the other records with GrID <> 100 returned.How can i achieve this one? I tried something like the following, but it is totally wrong.
PrivateSub Test(Byval Loc as Locale) Private Const GrID as integer = 100 Dim Query = From c In Mob Where c.CountryID = IIf(Loc = Locale.Gr, GrID, <> GrID) select c End Sub
I'm building an Active Directory wrapper in VBNET 2.0 (can't use later .NET) in which I have the following:
IUtilisateur IGroupe IUniteOrganisation
These interfaces are implemented in internal classes (Friend in VBNET), so that I want to implement a façade in order to instiate each of the interfaces with their internal classes. This will allow the architecture a better flexibility, etc.Now, I want to test these classes (Utilisateur, Groupe, UniteOrganisation) in a different project within the same solution. However, these classes are internal. I would like to be able to instantiate them without going through my façade, but only for these tests, nothing more.
How does one check to see if the system time is equal or not equal to a specific time? So, say I want to perform an action if your system time is between 6pm and 6am. Or something similar?
The idea is to scan a folder of images and then let the user navigate back and forth through the images using a couple of buttons.The problem is, I can only get it to return a single image, and not the whole lot. It's looks to me as though the images are getting assigned to the same index in the array. [code]
What type of connector do i need to actually save the Map data like point of the images (x,y coordinate) into the database . and then retrieve it to show on the page in asp.net and how do i go about doing it.
The app i am working on is for creating theme for the iPod touch... It has to deal with LOTS of images (100's potentially) There will be the set of default images, and then the user created replacement images. I started loading all the defaults into a resx file... thinking then I could just pull them out. now that I started setting the default, this sucks! lol the app will do this, on load it will set all the images (variables) to the resx images then when a theme is loaded, it will replace the default with the user image (if the user img exists) otherwise, the default stays. Then the "screen" is drawn to show the user. so, here is just the images to build the wallpaper, dock, and status bar...
I was thinking to make an app to save images [or download images] to local hard disk. But to keep it easy, I want this app to create a small picturebox on form to show the thumbnail of downloaded image. Lets say a 5 pictureboxes has to be added with the thumbnails to show the recent downloads. A user can save the location where he wants to save the files on hard disk. A listbox or a dropdown menu will help in categorizing the images, like image1 in friends section, image2 in family section, image3 in others, etc... When the program restarts all the latest 5 thumbnails has to be loaded in pictureboxes and the directory that was chosen. Finally, a button that shows the downloaded images into original image file size one by one or a slide show. Is it possible to make such program?
I am developing a visual basic 2008 express edtion program of an organisation that should get images from the system and display on image/picture box. further the program should save the displayed image in access database so that it can be retrieved together when you want to search the information about that particular employee.
I need this for my program. There is "add images" button where you can load multiple images and those images should be show on listview after loading.I have been trying to make this but could not get it work.
I have a program that will get a hash of the image but the problem is that I have to do to manually.I have a set of images of a folder names images(C:/images/) and ill be choosing which of those images i want to upload to my database.So far I got my program to work with database and such, wat I need is, if its possible I but the folder path on OpenFileDialog and I was a image to show in Picturebox1, then if I press button1 it will go to next picture.
Yesterday I asked why a adding 10 times 0.10 to a double is not equal to int 1;in VB Why (1 = 1) is False.I got an excellent answer. The overview is because:Floating point types and integer types cannot be compared directly, as their binary representations are different.The result of adding 0.1 ten times as a floating point type may well be a value that is close to 1, but not exactly.I can see the reason why now. However, if I do something like:[code]In this case I really obtain equality between double 1.0 and int 1. I thought then that double were only approximations so I would expect d to be somehow a value close to 1 as in the original first question. Why is not a good idea to compare directly different data types (in this case double - integer) and why I this time I obtain equality ??
I have a Date variable startdt and a String variable hdnsdate. Suppose if startdt has the value in the form 3/1/2012 and hdnsdate has the value in the form 03/01/2012. Than how can i compare that these two dates are equal in vb.net. In if condition of my program i want to do this check. In case the two dates match move out of if loop otherwise go into the if loop. E.g A sample in C# what exactly i want.
I'm a little foggy on System.Type versus an actual class type (like Object or XmlDocument) in .NET... will this code correctly determine if the type of a particular object is equal to a class I specify?
// Given "myObject" (unknown type), and some class type (let's say "MyClass")...
If myObject.GetType.Equals(MyClass)
If TypeOf(myObject) Is MyClass[code].....
Which one is correct? Bonus points if you can provide some information on what a class identifier is versus what a System.Type is. :)
Note: The language doesn't matter here, VB.NET or C# is fine, the code above is pseudocode.
I would like to compare dates (not times) for 2 datetime variables. I get one of the dates from database as follows and comapre it with yesterday.How can I do it?
Why does the first if statement evaluate to true? I know if I use "is" instead of "=" then it won't evaluate to true. If I replace String.Empty with "Foo" it doesn't evaluate to true. Both String.Empty and "Foo" have the same type of String, so why does one evaluate to true and the other doesn't?
//this evaluates to true If Nothing = String.Empty Then
I'm trying to set a text box equal to a value in dataGridView and I keep getting an error index out of range.The dataGridView is data bound to a stored procedure. When I move the text box setting to initiate after the form loads and a button is pressed it works fine; however, when it tries to automatically load after the fill command it errors out. The following code is what I have:
How do I declare/define a ResourceManager in the following code so it doesn't equal Nothing when it reaches rm.GetString("Magnitude") in the following code? My.Settings.. is returning a valid string.
The user will imput a number value then a - then some words after that. I just want the number value. But when I try to debug the app it breaks on this line of code with this error. Argument 'Length' must be greater or equal to zero.
In my decryption statement I am getting Argument 'Length' must be greater or equal to zero. is this statement wrong DecodedStr = Mid(DecodedStr, 1, InStr(DecodedStr, Right(DecodedStr, 4)) - 1)
I disabled an exception because it was bugging me i couldnt find an intermittent error. My program reads textmessages from a phone, however a problem sometimes arises, and I am slowly pinpointing the areas of the code that cause issues. I have found however that it is sometimes here:
'Get a string of certain length Shared Function GetString(ByRef PDUCode As String, ByVal Length As Integer) As String
[Code]....
check to see if length is zero AND thereofre try again in a moment, (because it usually works second time for some reason). I can think how to get around the exception