fixitchris Posted August 19, 2005 Posted August 19, 2005 (edited) Is there a problem with this setup? I am trying to use a value from one private Dataset to populate another private Dataset... Public Class Form1 Private Sub ListBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.Click Dim frm2 As New Form2 frm2.Text = frm2.Text & " HNDL" & Convert.ToString(frm2.Handle) colForms.Add(frm2) frm2.Show() [b]frm2.stest = ListBox1.Text[/b] End Sub End Class public class Form2 [b]protected friend sTest as string[/b] end class or is it better to set up properties? public class form2 Private m_SQLparam As String Public WriteOnly Property SQLparam() As String Set(ByVal value As String) m_SQLparam = value End Set End Property end class and call frm2.sqlparam= listbox1.text on form1? OR there's a better way yet??? Edited August 19, 2005 by fixitchris Quote
FZelle Posted August 20, 2005 Posted August 20, 2005 Properties are allways the better solution. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.