There are no control arrays in .NET and no need for them. You handle the Click event of the label, not the form. The ending part of the function header of the event handler just needs to be modified so it can handle the Click event of all of your label controls. You can do that by adding the name of each label and it's event name to the Handles clause:
Private Sub Labels_Click(blah, blah) Handles Label1.Click, Label2.Click, Label3.Click
Then, if the handler code, the label that was clicked will be in the sender argument passed to your event handler.
Alternatively, you can even skip the Handles clause and wire up the event handlers yourself using AddHandler.
Dave's one of the brightest minds on the boards here, but I'm going to disagree with him slightly.
You can have an array of an labels and setup everything dynamically. Is this the preferred way of doing things the majority of the time? NO. Most of the time you don't need to do this; however, sometimes forms or controls need to built and set dynamically (IE: dynamic menus, reporting forms, etc).
If you really need this functionality, create the array of labels and link them with the addhandler. As Dave mentioned, you can have one event that handles all the click events for the controls. Parse on the control name or whatever else you need to do to perform the correct function from within the event that is shared amongst all the label controls.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
I am using the Property grid in my application .Lets consider [None] has to appear if i set the property to empty.
Consider VB6.0 application to understand clearly .
Lets consider the Image property of Picture box. I set the image from My Documents. THen at the Image property i pressed the DEL key from keyboard .Directly it has to show the [None] as property text bcoz there is no image for the Picture box.
How to achieve this Functionality in Propertygrid ??
Without seeing code this is what I guess is going on.
Somewhere in your code your building a string that is supposed to be the path to your report.
You made a mistake in this, a path can only be 260 (I think and the error says so) char's long.
(try it in windows explorer you can't create a path longer than that (at least not in xp but I think the same applies in vista))
So you'll have to debug the code that builds this path to see where things go wrong.
Are you asking how to pass in a parameter into a crystal report (in the .vb code)?
If so, it would be something like this: ReportDocument1.SetParameterValue("MyParmName", "MyParmValue")
Or are you asking how to setup the parameter in the crystal report document itself (the .rpt file)?
If so, in the field explorer right click on parameter fields and then click new. Give your parm a name and data type.
Or are you asking how to input more than one table? A table isn't a parameter. If you want more than one table you have to put the tables into a DataSet object and pass the DataSet object in as the DataSource.
Do you still have a question or have you figured it out? The basic format is something like this:
Dim dtTable1 as New DataTable
Dim dtTable2 as New DataTable
<Insert code to set schema and fill the data tables here>
'This code declares a dataset and adds the tables:
Dim ds as New DataSet
'This code attaches the dataset to the crystal report: