|
According to MSDN[^], VB.NET offers this the same as C#.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks Graus...
well, i did'nt explain it properly.
I need to be able to access individual delegates attached to an Event.
Lets look at a simple scenario...
Class MyClass
Public Delegate Sub MyDelegate(...)
Public Event MyEvent As MyDelegate
protected Sub OnMyEvent(...)
'RaiseEvent MyEvent(...) ' I do not want to do it this way.
' I want to be able to loop through each delegate attached to the event.
.
.
MyEvent.GetInvocationList() ' VB Compiler does not allow this.
.
.
end Sub
end class
Thanks,
Zor
|
|
|
|
|
Off the top of my head here, shouldn't that highlighted line you posted read:
Dim callbackList() As MyDelegate
callbackList = MyDelegate.GetInvocationList()
????
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
"MyDelegate" is Just a Type. Not an instance.
GetInvocationList() cannot be called on MyDelegate.
Thanks,
Zor
|
|
|
|
|
Is there any control which is like a panel control in visual basic.Net. Actually i have different forms(which i can make as user control) which i want to load on a single form when that option is selected otherwise how can i do that.
Monica
|
|
|
|
|
It's a bit difficult to understand exactly what your talking about or what your specifically looking for. But from what I can understand, wouldn't you be describing an MDI application? A parent form (MDI Parent) with a bunch of child forms (MDI Children).
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
More Precisely i have a medical application. In a consultation a doctor selects a diagnosis which has different findings and then surgery booked for it.
Now these diagnosis have many findings common and many differnt. so i was finding a way to load at runtime the differnt findings on the finding page with common still on that page. as there are about say 20 diagnosis i cannot make controls all on the same form.
i hope i made my problem a bit more clear .
Monica
|
|
|
|
|
monicatushar wrote:
Is there any control which is like a panel control in visual basic.Net.
Yes, there is. It's called 'Panel'. If you can't find it, sort your list of controls in the design view alphabetically ( right click for that option ), and look under 'P'.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i am talking about Visual basic 6 not .net
monica
|
|
|
|
|
Oh - when you said 'Is there any control which is like a panel control in visual basic.Net.', I assumed you were specifying what version of VB you were using, when in fact you were saying you wanted one like the VB.NET one to use in a version of VB that was left unspecified. Sorry, I have no idea about that, I have never used VB6, nor would I ever be willing to. I just answer VB.NET questions as they often can be answered through my knowledge of C#.
Even if this is a legacy application, I believe that there are converters from VB6 to VB.NET, perhaps you could update the project ? I know it's possible to move VB.NET projects to C#, I've done it a number of times with very good success.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Hello,
I think the "Frame" control is what you are looking for; it should be in the toolbox.
Hope this helps,
Mitch
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
Get Perpendicular! (Hitachi Storage)
My CodeProject Blog
Most recent blog post: April 11
|
|
|
|
|
can anyone tel me how to access one variable retrieve from a database in one web form from another web form.....
and also how to allow multiple clients to have access to the web application....
|
|
|
|
|
shekkk wrote:
can anyone tel me how to access one variable retrieve from a database in one web form from another web form.....
Load it from the database again, or cache it per user.
shekkk wrote:
and also how to allow multiple clients to have access to the web application....
Put it on a public web server.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i want to know how to allow text in php and word documents to open from inside a wb apllication form...
|
|
|
|
|
You want to run PHP within an ASP.NET page ? I doubt it. Word docs will open as a page automatically. If you mean within part of a page, perhaps a frame will do it ?
Please start putting something meaningful in the subject line, if people know what you're asking about, they're more likely to answer.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello, Ive got the following problem:
I don't know how to create a NEW member everytime i click the button. I've got:
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click<br />
<br />
Dim Mem1 As New Member<br />
<br />
Mem1.Title = Me.cmbTitle.Text<br />
Mem1.Forename = Me.tbForename.Text<br />
Mem1.Surname = Me.tbSurname.Text<br />
Mem1.Address = Me.tbAddress.Text<br />
Mem1.Town = Me.tbTown.Text<br />
Mem1.Postcode = Me.tbPostcode.Text<br />
Mem1.DateOfBirth = Me.tbDob.Text<br />
Mem1.Telephone = Me.tbNumber.Text<br />
Mem1.CustomerID = Me.tbID.Text<br />
<br />
End Sub
But it doesn't create anew member each time?????
Any help will be much appreciated.
|
|
|
|
|
Of course not. All you did was create a Member object, called it Mem1, set a bunch of properties on it, then forgot about when the Sub finished.
What are you trying to save this object in? You don't have any code in here to save the object anywhere.
You need to store the object somewhere, like in a collection, that was created outside this function you posted. Currently, the Member object you created only exists inside this function.
For instance, if you wanted to create a new TextBox control on a form you could:
Private Sub btnNewTextBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewTextBox.Click
Dim myNewTextBox As New TextBox
myNewTextBox.Text = "Some text..."
End Sub
Just like you did with your Member object. But, you'll never see this TextBox to be able to do anything with it because at the end of the function, the new object is detroyed because nothing outside this function can get to it. What you need to do is add it to a collection that was created outside this function. In my example, its the form's Controls collection:
Private Sub btnNewTextBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewTextBox.Click
Dim myNewTextBox As New TextBox
myNewTextBox.Text = "Some text..."
Me.Controls.Add(myNewTextBox)
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how would i do this if i am to create more members from the same control??? i'm new to this.
|
|
|
|
|
Same thing. Create the new member and add it to a collection that's been created outside the function your creating the new member in.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
|
Details man! Details! What on earth are you talking about, "other end"? Of what, a 10 foot pole?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
;PR u joking it means from other form
|
|
|
|
|