Find Dialog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to create a find dialog box and I need to understand this part of .NET (I am an experienced vb6 programmer):
- How do i create a variable that can be accessed and modified on two forms? I tried public variables in a module, but they didn't seem to work.
- How can I do something like (in vb6) frmMain.txtMain.Text = "HI" . I have searched and searched an I can't understand how to do this!

Thank you!
 
Hi Newto,
I'm trying to create a find dialog box and I need to understand this part
of .NET (I am an experienced vb6 programmer):

Make a form and than you can use
dim frmdialog as new form2
myvars.myproperty = something 'see below
frmdialog.showdialog (you can also test the return value with this)
frmdialog.dispose

And on Form2 in the load event when you use it as above
mytextbox.text = myvars.myproperty
- How do i create a variable that can be accessed and modified on two
forms? I tried public variables in a module, but they didn't seem to work.
The above method should work, however the nicest way is
\\\
public class myvars
Private Shared mVar As String
Public Shared Property myproperty() As String
Get
Return (mVar)
End Get
Set(ByVal Value As String)
mVar = Value
End Set
End Property
End Class
///
- How can I do something like (in vb6) frmMain.txtMain.Text = "HI" . I
have searched and searched an I can't understand how to do this!

And than the easy one
me.text = "HI"

I hope this helps?

Cor
 
Back
Top