473,378 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Click Events for Images at Run-Time

Hi,

I need to create a vb.net windows program that allows users to create
copies of an image when a button is clicked and then allow them to
place the image on any point in the user interface. I am still trying
to figure out how to do that (so any suggestions on how to do that
would be welcome) - but the main thing I am confused about is how I
can then attach a click event to those images when they only get
created at run-time by the user. Could anyone point me in the right
direction for how to do this? Thanks in advance!!

Joy
Nov 20 '05 #1
3 994
something to help you on the way...
Public Sub AddPicture()
Dim picture As New PictureBox
'set picture properties, add picture to form or so...
AddHandler picture.Click, AddressOf PictureClick
End Sub

Private Sub PictureClick(ByVal source As Object, ByVal e As EventArgs)
MsgBox("Picture clicked")
End Sub


<si***********@yahoo.com> wrote in message
news:1d**************************@posting.google.c om...
Hi,

I need to create a vb.net windows program that allows users to create
copies of an image when a button is clicked and then allow them to
place the image on any point in the user interface. I am still trying
to figure out how to do that (so any suggestions on how to do that
would be welcome) - but the main thing I am confused about is how I
can then attach a click event to those images when they only get
created at run-time by the user. Could anyone point me in the right
direction for how to do this? Thanks in advance!!

Joy

Nov 20 '05 #2

Oh thank you! That helps a lot! I really appreciate you taking the
time to help me out! Just a quick question - is it possible to add a
handler for picture.doubleclick?

Joy
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3
Joy
Alright, I was able to track down the rest of your code and it works beautifully. Thanks you so much - I am very grateful

Joy
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Roger Shrubber | last post by:
I have a page with images that the user can drag from one frame to another. I need them to see a "ghost image" of the image they are dragging, while the original stays put. I use the onmousemove...
20
by: dukeleto | last post by:
I know this is an annoying thing on some sites. I have set some images in an online gallery to have their own java po up window that is set to be the same size as the image. I would like to...
18
by: nutso fasst | last post by:
Hello. Is there a way to make an element 'transparent' to mouse activity, such that mouse events go to the underlying element? I have an absolutely-positioned image element with transparency...
0
by: Anina | last post by:
It looks like the button control captures all of the clicks on the button no matter if the program is busy accessing code. For example: if the click event of a button has code that takes 10 seconds...
5
by: Jeff Ptak | last post by:
Can anyone tell me how to trap mouse click events in the Image control? I am trying to implement an image zoom feature using JavaScript where the user could "draw" a zoom box (aka rubber band...
24
by: ej1002 | last post by:
Hi I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C#...
1
by: Tebogo Tefo via .NET 247 | last post by:
Hi I have a user control that contains three dropdownlists that I populate according to what was selected in the other dropdownlist (i.e. populate dropdownlist2 after selecting a value in...
5
by: Ben Dewey | last post by:
This is a repost, But I have some new information. I have a server that is configured for .NET 1.1 and 2.0. For some reason all my postback events for aren't firing when using .NET 1.1. Under...
4
by: simon | last post by:
have an image (acting like a button) currently that has onMouseOver and onMouseOut events. want to make this accessible to the codebehind with a click event. was able to right click at and choose...
0
by: jtencate | last post by:
I am creating a gridview programmatically and am using a Template for one column. The template is derived from a custom class that inherits ITemplate. There are two buttons in the template The...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.