Hi, I got many helps from here however I could not provide many help to others 'cause I'm very newbie.
Here is the problem. I know how can I set custom event handler from local form and others.
I made specific DLL Form which is made by Visual C#, which has certain "public" TextBox so I can see it's value
from my main VB.net program.
Problem is, I want add "TextChanged" event handler for this TextBox from DLL, it is easy to set by C#:
So, now I can handel and communicate from main application to custom DLL.Code:// Declare using my custom DLL using MyDLL; // Declare new instance for custom DLL (it is oviously Form DLL) static MyDLLClass SubForm = new MyDLLClass(); // I can easly add this eventhandler for DLL's TextBox which name is "EventBox" SubForm.EventBox.TextChanged += new EventHandler(SubEventHandler) private void SubEventHandler(object sender, EventArgs e) { .... }
As soon as there is text entered on DLL's EventBox textbox, main app can catch it and fire
my own codes.
And now, I want use this DLL for my VB.net project.
I belive this would work but it isn't.Code:' Declare using my custom DLL Import MyDLL ' Declare new instance for custom DLL (Same as C#) Public SubForm as MyDLLClass = new MyDLLClass() ' I want add custom Event Handler for this: AddHandler SubForm.EventBox.TextChanged, AddressOf SubEventHandler Private Sub CAMEventHandler(sender As Object, e As EventArgs) ... End Sub
There is no error whatsoever when I build project. Run, show and hide DLL form, and it's functions
are work perfectly but only not fire event handler.
Is there any way to do it? Please teach me the way, masters.
Thanks in advance!




Reply With Quote
