473,395 Members | 2,468 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,395 software developers and data experts.

Adding PictureBoxes during runtime (vb .net 2003)

hi,

i would like to add pictureboxes during runtime, but there should not be a
specific variable for each picturebox becouse i don't know how much it will
be. so i declared a collection referencing on one var declared as picturebox.
it works fine to add the controls this way. now i would like to implement one
picturebox click handle for each added picturebox and i have no idea how to
do this.

Friend WithEvents Device As PictureBox
Dim Devices As New Collection
.....
Device = New PictureBox
Devices.Add(Device, DeviceID)
Me.Controls.Add(Devices(DeviceID))
....

Feb 12 '07 #1
1 1327
In article <71**********************************@microsoft.co m>,
Ma***@discussions.microsoft.com says...
now i would like to implement one
picturebox click handle for each added picturebox and i have no idea how to
do this.
See the "AddHandler" statement.

--
Patrick Steele
http://weblogs.asp.net/psteele
Feb 16 '07 #2

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

Similar topics

8
by: filip stas | last post by:
How do i add references during runtime?
2
by: manohar.shankar | last post by:
Hi, I have been searching on this topic for quite sometime and didnt get any answer. Is there a way I can extend/add methods/properties to a C# class during runtime. eg., I have class:...
1
by: Tom Rahav | last post by:
Hello. I use visual basic .net 2003 and Crystal Reports for creating win-reports. My question is if there is any possibility to set font properties (type, color and size) of a text control or...
0
by: Hai Nguyen | last post by:
I want to add a text box into a template column during runtime. I can add a boundcolumn but not with template column. I allow user to type in something in the textbox in the datagrid. I wanna know if...
2
by: hufaunder | last post by:
I have to present inputs (textbox, combobox, etc) that are not known during design time. In the past this was pretty simple to do. You just add a new control to the Controls property of a form. How...
5
by: shubhlu | last post by:
hi I have a problem that I have a COM dll and i need to access the methods in that dll. But what is required here is that the dll needs to be added as a reference only during runtime and not...
2
by: joe.wilkes | last post by:
does anyone know how to add settings during runtime? I would really like to incorporate this feature into a app that I am building.
1
by: ton | last post by:
Hi, I want to add several textbox to my form during runtime: the code is very simple Lab = New TextBox Lab.ID = "A" & i Lab.Height = 200 Lab.Visible = True Lab.Text = "test"
2
by: Maniax | last post by:
I am trying to make a program which adds 12 text boxes in a line when the user presses a button... however i want that button to be able to be clicked for as many times as the user needs... how can i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.