Check What Specific Part Of A PictureBox Was Clicked?
Sep 24, 2011
Let's say I have a PictureBox with an image of a house, for example, and I want to know if the user clicked on the roof, the door, the window, or the walls.
Is there some way to, maybe, set up an If statement so that it checks what the coordinates of the mouse click was and compares it to a set of pre-determined graphed points to decide what object was clicked?[code]....
View 5 Replies
ADVERTISEMENT
Jun 5, 2009
I am fairly new to vb.net and the form includes 3 picture boxes in red which you can click and change their color to green, also each picture box have three text box associated with it and they are by default color dark gray. I want the system to check whether the picture boxes are clicked and if yes set the associated text box colours to white.
Here is the code I wrote:
Public Class Screen
Inherits Windows.Forms.Form
Dim T(1, 2) As TextBox
Dim S(2) As PictureBox
Dim x, i, j As Integer
[Code] .....
View 7 Replies
Jan 17, 2010
Is there a way to check specific pixels in a picturebox to check the color? Basically what I have is a black square with some white dots, and I want to find the position's in the picture of the white dots.
View 2 Replies
Oct 12, 2009
I need to create up to 45 pictureboxes dynamically and then detect which one was clicked. I have code like this so far:
Private Sub Create_Thumbnails()
Dim sSource As String
Dim sDest As String
[code].....
View 4 Replies
Feb 5, 2010
I have a picturbox, which I redraw everytime you move the image inside of it... (g.Drawpath...) So in fact my picture is like 10000x10000, but my picturebox only 1080 x 540. So you only see a specific part of it. Now I'm trying to print ONLY the part I see.
View 10 Replies
Jan 17, 2010
Select part of picturebox?
View 1 Replies
Mar 6, 2012
I have a form and i want to print a specific part how do i specify that? I have a printdocument and a printpreview
View 3 Replies
May 20, 2009
I am using the MouseClick event toc change the image of a picturebox when it is clicked:
Private Sub PictureBox7_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox7.MouseClick
PictureBox7.Image = Image.FromFile("C:Documents and SettingsjacobscDesktoplogogoclick.png")
End Sub
The problem i have is that this tool will be used on different users computers and not just my own and at the moment when it is used on another computer it gives an error that it can'f find the image.
This obvioulsy happens as it is looking for my desktop, how can i change so that the image can be saved within the tool and therefore will work on other computers?
View 3 Replies
Sep 12, 2011
just wondering if its possible to fade out a picturebox slowly after it has been clicked?
View 4 Replies
Jun 15, 2012
How to show a specific part of web page in visual basic form or in webbrowser?
this is problem for someone but like my problem.I am creating a application,at present my application is in development stage My app has a web browser control and a button the web browser will load you tube videos in the web page.i need to do display the video but i like to skip the other parts of the web page.this means showing video player on the web page and skipping the other parts
View 2 Replies
Feb 13, 2011
I am creating a application,at present my application is in development stage..My app has a web browser control and a button the web browser will load you tube videos in the web page.i need to do display the video but i like to skip the other parts of the web page.this means showing video player on the web page and skipping the other parts..all it is setting the height and width of the web browser to display the specific part of a web page(scroll to the control and display it centered)
View 2 Replies
Jun 9, 2011
I am trying to make a program which outputs an Invoice Number, which consists of the first 3 letters of a person's first name and the last 3 digits of their zip code. The user enter their first and last name, then enters their city, state, and zip such as:
Name: Billy Jones
City, State, Zip: Chicago, Illinois 42349
Therefore, the invoice would look like:
Invoice: Bil349
I can get the first 3 letters of the first name fine using the substring function, but I have been stumped on how to get past all of the text to get the last 3 digits of the zip code entered.
View 2 Replies
May 19, 2009
I have a loaded DatagridView which contains a row/column with an employee number in it. Outside of the DatagridView at the the top of my form I have a small PictureBox. My goal is for the user to select the employees row (not cell),pull the employee number from that row/column, and then use a LINQ query against another table to display the image stored in that table.
Determine the event needed in the DatagridView?How do I pull the employee number from the selected row?What considerations, if any would the LINQ query need to pull the picture from the table?
View 4 Replies
Jan 2, 2012
Basically, I want PictureBox1 to zoom in on a certain location of a form.
Like this
PictureBox zooms in on part of the form.
NO I dont want it to change a fixed zoomed in image so dont tell me to zoom it in and put a fixed imaged. As the image i wanted zoomed in constantly changes.
P.S This example isn't my form, just an example
Just to make it clear, I want my pictureBox to zoom in on a different part of the form. The image is on a part of a WebBrowser.
View 1 Replies
Aug 26, 2009
how do i check if a mouse was clicked in a specific coordinate plane on the form"?
View 2 Replies
Nov 10, 2010
how do you reset a progressbar to beginning after a specific button is clicked?
[Code]...
View 1 Replies
Feb 16, 2009
i clicked and dragged a picture into my form. How can I get it to be displayed in a picturebox?
View 1 Replies
Jul 31, 2010
I am currently creating an app and i want to be able to get the colour of a pixel, but in a picturebox.Example: I click anywhere in the picturebox and it will give me the color of the pixel I clicked.
View 3 Replies
Sep 8, 2011
How to read a string in another string where between Starting Index and first-encountered Ending IndexI have one giant file which contains info for each customers and they seperated the customers info with Starting and Ending Indexes and I need to get a specific customer info to display.
Dim oFile As New FileInfo(sFileName)
Dim sFileContent As String = oFile.OpenText().ReadToEnd()
Dim iStartIndex As Integer = sFileContent.IndexOf(roNotification.StartByte)
[code].....
View 2 Replies
Mar 21, 2010
I have a for each item in listbox:
try
'code goes here
catch ex as exception
end try
next
now, in my code, i also have if ex = certain error. i'd like it to go back to the top of the try. reason for not letting it do its thing is, i am wanting it to retry it, under the same item. So, is there a way to goto a portion of the code.
View 4 Replies
Jan 5, 2012
I have a function list of 75000 for my project. I want to load each class file dynamically and need to add one line on top of the function and to lines in the ending. Which is the best way to update a specific part of the file. I don't want to make a small mistake here since its my source code and globally using.
View 2 Replies
Dec 15, 2011
My application is like this : i have to search my data from database with some check box and text box when user select check box specific function go on and then when user enters some range of value in textbox then the result will shown in data grid view after that i can print it by selecting data
my vb.net code is as follow:
Imports System.Data
Imports System.Data.SqlClient
Public Class XtraForm1
[CODE]............
I m also pasting the demo picture.
View 2 Replies
Apr 6, 2012
inside of while loop, i've used
[Code]...
to creating the button dynamically. Now, on click of particular button, it should show the information which are associated with the clicked button.
[Code]...
View 1 Replies
May 27, 2010
I am currently working on a program in VB that is 480,600 and am using a panel with a picturebox inside of it so that I can use scroll bars to view a chart in the picturebox since my form will be so small. Since viewing a large chart is pretty irritating using scroll bars to some, what properties can I enable or disable to get the panel and picturbox to expand also when the Form Maximize button is clicked rather than staying the same size up in the top corner?
View 2 Replies
Mar 12, 2012
I want to make an option to load a playlist file into a textbox.. To do this i guess i will need the OpenFileDialog and Streamreader..
Untill further i have done this
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
OpenFileDialog1.Filter = "Playlist files|*.pls;*.asx"
[Code]....
I want to be able to read ONLY the link from the file.. In the first file above it would be after the "File1=" text in the file.. And in the other file it should be whats written after the "<ref href="" part..
And as you see in the second file there are three links, so to start with it should only read the first line, maybe later i could make a selection window popup or something..
View 16 Replies
Jan 29, 2011
i want a random image from just a part of the resource folder to be shown in a picturebox . i have this code but it for the hole of the resource folder
Dim prng As New Random 'should be in namespace
'get list of all resources
Dim rs As System.Resources.ResourceSet = [code]......
View 1 Replies
Apr 19, 2009
how can i check if a command button is clicked in vb.net 2003?
View 1 Replies
Feb 22, 2009
how can i check if ok was clicked in a inputbox? works fine with msgbox:
Dim Confirm = MsgBox("Are you sure?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Action Confirmation")
If Confirm = MsgBoxResult.Yes Then
'code
End If
but it returns an error with inputbox Conversion from string "" to type 'Double' is not valid.
View 2 Replies
Jan 15, 2012
Private Sub Button_Click() Handles Button1.Click, Button2.Click, Button3.Click
MsgBox()
End Sub
[code].....
View 1 Replies
Aug 27, 2010
How can I make my webbrowser control to show only a specific part of the site. for example show only the google text on [url]...
View 1 Replies