How to add a control to a form from a module and receive it's even

N

Nigel V Thomas

I have a module (mMain.vb) and want to dynamically create a form, add a few
controls and receive their events in the mMain.vb module.

1. I can create the from using DIM myfrm as new Form
2. I can add controls to the form using myfrm.addcontrol("ListBox")

But how can I receive the events back in my module

Any help appreciated

Nigel
 
A

Armin Zingler

Nigel said:
I have a module (mMain.vb) and want to dynamically create a form, add
a few controls and receive their events in the mMain.vb module.

1. I can create the from using DIM myfrm as new Form
2. I can add controls to the form using myfrm.addcontrol("ListBox")

But how can I receive the events back in my module

IMO, that's not a good idea. Why don't you put the code into the Form?


Armin
 
N

Nigel V Thomas

Armin

Sorry for not getting back to u.

All sorted now.

What I was trying to do is create a reusable wizard form, to which I could
programatically add controls as need, but I have found a different way now

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top