By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,970 Members | 1,668 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,970 IT Pros & Developers. It's quick & easy.

Fill a listbox1

P: n/a
Jan
Hi there,

Is there a solution to the following problem:

I've got a button1 in form2, with this button1 I want to fill a listbox in
form1.
How can I make listbox1 in form1 accesable for form2??

thank you
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
* Jan <ca*****@planet.nl> scripsit:
I've got a button1 in form2, with this button1 I want to fill a listbox in
form1.
How can I make listbox1 in form1 accesable for form2??


In the 2nd form:

\\\
Private m_t As TextBox

Public Sub New(ByVal ResultTextBox As TextBox)
MyBase.New()
m_t = ResultTextBox
InitializeComponent()
End Sub

' You can access the control with m_t.
///
Main form:

\\\
Dim f As New Form1(Me.TextBox1)
f.Show()
///

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.