VS 2008 Checking If PictureBox1 Contains PictureBox2?
Oct 19, 2011
I have a project in which I turn a picturebox into a bitmap and I want to check if picturebox2 exists within picturebox1. NOT THE SAME IMAGE.Picturebox2 is a smaller image and isnt THE SAME image as picturebox2.For eg.If picturebox1 was The google logo.and if picturebox2 was Now they arn't the same but picturebox1 CONTAINS picturebox2.I want it to be able to check if it exists in picturebox2 and get the COORDS of the location WITHIN picturebox2I have this code so far but don't know how to finish it
Dim bmp As Bitmap = DirectCast(PictureBox1.Image, Bitmap)
Dim bmp1 As Bitmap = DirectCast(PictureBox2.Image, Bitmap)
For x As Integer = 0 To bmp.Width - 1
[code]....
View 8 Replies
ADVERTISEMENT
Sep 2, 2011
i have search on google many hours but i dont find what i want.I have 1 standar image in picturebox1 and another picture in picturebox2 where i load it manually.I want to compare to see if there are a BIG diference like people, dog etc.My algorithm always say is diferent when found diferent light. I want to find a big diference to return true.
[Code]...
View 3 Replies
May 2, 2011
How can I iterate through PictureBoxes named PictureBox1, PictureBox2 ... PictureBox24 in Visual Basic 10
View 1 Replies
Aug 1, 2009
i wanted to ask how to make picturebox1 ,to which functions are already assigned, perform the same function as picturebox2 ,to which no functions are assigned.For example:I have already made picturebox1 and have assigned it alot of function like when play button is pressed then picturebox1.visible = true and when we press pause button picturebox1.visible = false. So now i decided to make a theme and have to remove the picturebox1 and want to allow the picturebox2 to havefunction of picturebox1.But when i disable the theme the function of picturebox1 should go back to picturebox1.
View 6 Replies
Nov 18, 2009
I am currently working on a drag and drop project and I was wondering if there is a way to drag picturebox1 and drop it in picturebox2; that will snap to a specific location in the picturebox2?
View 2 Replies
May 21, 2010
we were asked to create a game.Me and my friend decided to go ahead and make the game 'Snake' (I think you all know this one)Since we never had any teaching on how to do it we looked already made games and used the same code (we found this one on a Youtube tutorial so I think it was alright to copy it).We picked it because it seemed pretty easy and we can tell what each thing does in the code.I also like fooling around so I changed all he values and stuff so I understood better what was going on.The game goes great but sometimes when the snakehead touches the food it doesn't 'eat' it and I don't know why :This is the part of the code that takes care of eating the food.(PictureBox2 is the snakehead, PictureBox15 is the food)
[code]...
I just don't know why does happens. The PictureBox2 touches PictureBox15 but nothing of what I typed above happens.
View 6 Replies
Oct 24, 2010
I am trying to project a line from the corner of picturebox2. Program has several issues but the biggest one is: I get the line to draw from the corner when drawing to the form but when i try and draw to picturebox1 it is not even close to the corner of picturebox2.
Here is my
Public Class Form1
Dim Go As Boolean
Dim LeftSet As Boolean
[Code].....
View 2 Replies
Jun 21, 2010
SQL Table employees has data as follows
sno--name----img-----img_path
1-----A----Binary---D:C2009BITMAPSPICT.JPG
2-----B----Binary---D:C2009BITMAPSeric.JPG
Now I want to display picture in picturebox1. To do this I use this codes, but it does not display picture on this line: Dim arrPicture() As Byte = CType(dt2.Rows(0)("img_path"), Byte()) it shows this message,
Unable to cast object of type 'System.DBNull' to type 'System.Byte[]'.
str2 = "select * from employees where sno =" & Val(Me.TextBox1.Text)
cmd2 = New SqlClient.SqlCommand(str2, con)
[Code].....
View 12 Replies
Jan 15, 2012
i am want to draw lines on a picture for my project.Apart from the PictureBox1.Refresh() function, i wanted to know which other functions can be applied to a PictureBox.Moreover, I am trying to draw a line from a point to another several times on the same picture.I am actually using the PictureBox1.Refresh() that is not effective in my case when I want all the lines I draw to remain on that same picture. Currently, when I am trying to draw another line, the first one is cleared and the new one only is shown.
View 1 Replies
Mar 14, 2011
I'm trying to populate PictureBox1 through to PictureBox9. I'm using the first 9 images by way of a test before I expand the program to use the rest.
Private Sub Pop()
Dim a As Integer, x As Object, z As String
For a = 1 To 9
[code]....
This seems to work up to: -
Dim p As Image = New Bitmap(Me.GetType(), z)
At this point I get an exception which says "Resource 'Pic01.png' cannot be found in class 'Project_1066.Form1'."However, when I open the Resource page it looks something like this: -
Project 1066
[+] My Project
[+] Referencies
[code]....
View 23 Replies
Feb 23, 2010
I would like to be able to fade out the picture in a picture box, like a fade to black deal. It should be completed in about 6 seconds. How I could do that?
View 11 Replies
Aug 4, 2010
Is there any better performance by checking for a true value like this:
[CODE]..............
Than like this:
[CODE]..............
View 5 Replies
Jun 11, 2010
I cannot seem to get my image resources to load into PictureBox1.I can see all the images I added as resources in the solution explorer.They are a series of PNG files with names associated with countries.I am at the beginning stages of randomly changing the image that is displayed in PictureBox1, but I cannot even get the first image to load.Here is my code so far. When I click on Button2 I can see that my array returns a random country, but no image loads.I even tried typing in several of the countries names as well as the country name followed by png (e.g. chine.png) and again no image loads.
Public Class Form1
Dim randomObject As New Random()
Dim Flags() As String = {"australia", "brazil", "china", "italy", "russia", "south africa", "spain"}[code]......
View 2 Replies
Sep 5, 2010
can someone show me an example script of how I would upload picturebox1's Image to an FTP connection?
View 3 Replies
Jun 30, 2010
I'm making a program that can search for all .JPG files and display them in a ListBox. Now I want it to display the selected ListBox Item in the PictureBox1.I have tried many codes but none of them worked.The files in the listbox are listed like this: C:\Documents and Settings\My pictures\ Image01.JPG.
View 4 Replies
Jun 21, 2010
I'm making a program that can search for all .JPG files and display them in a ListBox. Now I want it to display the selected ListBox Item in the PictureBox1.
The files in the listbox are listed like this :C:Documents and SettingsMy picturesImage01.JPG
View 1 Replies
Sep 23, 2008
I am trying to verify that an image has been loaded into the picturebox1. I am loading the image from the web and need to verify it has arrived before I can save it to disk. If I save it to soon I will save nothing and that will crash the app. I have tried to use 'if PictureBox1.image = nothing then' ... 'End If', but that isn't a valid check. I can obviously not check picturebox1.image if it is empty or has an image.
So the question is, how do I verify that the file has finished loading?
View 4 Replies
Oct 23, 2006
I am able to save images from a picturebox in the .png format properly, but not using .jpg or .gif formats. What I get is a black image only with .jpg and .gif. The picturebox has a white background with text and lines on it which I generate via VB coding.
View 13 Replies
Mar 20, 2011
How to save image from picturebox1 to access database.
View 2 Replies
Apr 30, 2012
how could i insert PictureBox1.Image into sql server i built the database
table name is"prodect"
column is "pimg"
i tried this code
class1.cmd = #"insert into prodect #pimg# values #'" & PictureBox1.Image & "'#"#
but it is give me this error
Error2Operator '&' is not defined for types 'String' and 'System.Drawing.Image'.C:Usersprodocumentsvisual studio 2010ProjectsaccountingaccountingForm1.vb8823accounting
i deleted this & also i got error
Error3')' expected.C:Usersprodocumentsvisual studio 2010ProjectsaccountingaccountingForm1.vb8863accounting
View 12 Replies
Feb 28, 2012
I have a Problems Regarding with the IMAGE I create a Program That save Information of END USERS including Image...but the Image will save into Bytes.....and I have no Problem in that as you seen below.....
[code]...
This is My Problem i have this Search Engine that can Search information that can show the information needed from the database....... it works Nicely but I don't know how to show/Retrieve the Image from Bytes to Image itself and show it into the PictureBox1.. the code shown Below..
[code]....
View 2 Replies
Apr 6, 2010
Dim Reso As String
Reso = TextBox2.Text
PictureBox1.Image.Size.ToString(Reso)
I am trying to get the current size of the image in picturebox1 to show up in textbox2.
View 1 Replies
Aug 10, 2009
Put a picturebox1 on a form2, and paste the following into form2 public class. When you run it you will see nothing untill you force a paint event by mouse dragging the form half off the screen. If you minimize - then maximise - the image dissappears and the picturebox1 does not repaint itself??? I want the picturebox1 to be "auto drawn" somehow.
Public
Class Form2
Dim colr As System.Drawing.Color
Dim grfx As System.Drawing.Graphics
[code]....
View 4 Replies
Dec 21, 2011
i have a textbox in a calculator and i want an if function so that it checks that there cannot be 2 .'s in it:[code]
View 2 Replies
Jun 15, 2010
I'm trying to determine the framework version that is installed via the registry. When poking around, I found this key: HKLMSOFTWAREMicrosoft.NETFrameworkPolicyv4.0 I've created the following function to determine if the key exists:
[Code]...
I've verified the key exists, but it keeps returning False.
View 1 Replies
Apr 25, 2009
i know My.Computer.Network.Ping but as alot of people know, it's glitchy and bugged.
I want something that checks to see if it can connect with something, as simple as it sounds.
I'm experimenting with sockets at the moment, but having trouble so i thought i would come and ask here
What i'm up to:
VB
IP = Net.IPAddress.Parse(getinfo("settings.inf", i & "IP"))
socket = New Net.Sockets.Socket(Net.Sockets.AddressFamily.InterNetwork, Net.Sockets.SocketType.Stream, Net.Sockets.ProtocolType.IP)
[Code].....
However the problem with this it that i pinged 1.1.1.1 and it still connects, ALSO i would like to be able to check a hostname not just an IP to make things more convenient, please help me to find a way to properly check a connection with IP or hostname.
Note: The getinfo function is defined by me
View 1 Replies
Feb 28, 2010
In the following code, a Date variable is declared but not set to anything:
Dim myDate As Date
What's the proper method of checking if the Date variable is "new" and not set to anything?
For example, getting the lowest date value from an array of dates:
Dim dtMostRecent As Date
For i As Intger = 0 To myDateArray.Count - 1
If myDateArray(i) < dtMostRecent Then dtMostRecent = myDateArray(i)
Next
In the code above, I need a way to check first if dtMostRecent is unassigned, in which case just give it the first value, after which it can be compared with subsequent values. How to check if a Date variable is unassigned.
View 5 Replies
Jul 19, 2010
I've created the following function and thrown it inside of a timer:
[code]...
It works, but it keeps trying to open media player for each process it looks like. I need to continuously run the function so that Media Player opens when it's closed.how to make sure it opens only once when the process doesn't exist?
View 12 Replies
May 16, 2011
Can someone tell me why this code works exactley the opposite of the way I thought it should?
[code]...
I have a combobox (cbKeyWords). I want to make sure tbAddEdit.Text does not already exist before I save. To me I should be testing for a False result not True. But the above code, goes to the msgbox if findstringexact=false and saves the data if it's true.
View 2 Replies
Jul 15, 2009
I was curious why this bit of code won�t detect that the ARGB value is Blue:
[Code]...
When I run the code it says that the color isn�t Blue.
View 3 Replies