Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by fixitchris

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...