global varaiable

  • Thread starter Thread starter Angel Soft
  • Start date Start date
A

Angel Soft

I want to use a value selected in a combobox in o form in another form of
the same aplication.
I don't know how.

pls help

Nick
 
Angel Soft,

Create a public property or if you want (not as nice) a public string on
your second form.

When you than use the inbuild VBNet program start method and not the classic
VB6 module method you can do.

In your main form
dim frm2 as new form2
frm2.myproperty = mycombobox.text
frm2.showdialog

In your second form where is the property in the load module
mylabel = myproperty

This is not dynamicly however only the first time, very usefull with
showdialog forms. You can do this as well dynamicly with 2 forms
continiuously open. However I do not like the simple method for that, I do
not show you that directly, so try if this fits you first.

I hope this helps?

Cor
 

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

Back
Top