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

  • Thread starter Thread starter Nigel V Thomas
  • Start date Start date
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
 
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
 
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
 
Back
Top