473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Fill a listbox1

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
1 1164
* 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bilo | last post by:
I dont know what i am doing false. the code : private void button2_Click(object sender, System.EventArgs e) { foreach (string filename in listBox1.SelectedItems)...
1
by: Brian | last post by:
Was browsing around online for code to connect to a database usign ADO and C#... and i found this very simple but useful reference (http://www.c-sharpcorner.com/database/db_list.asp) However,...
0
by: brian | last post by:
I am trying to Dynamically create a table and can't figure it out. I've been looking at the table class but don't understand how to use it. I am new with using .net Below is my code. I would...
2
by: Jan | last post by:
Hi there, I'm a newbee in vb.net with the following problem: 4444528; Baltic Birch; 16.20; 0 I have more of these lines in a ListBox1. Now I want to change the latest 0 with the...
2
by: Bernie Yaeger | last post by:
I want to open a window with a listbox (custlist) in it, but I want to automatically select a certain item in the listbox, and have it be the correct selectedindex. The call to open this window...
2
by: Krupau | last post by:
Hi Friends, I am getting following error message.. I am so fed up of this error. I am trying to solve it so long time. Please help me!! .Thanks in advance... Object reference not set to an...
8
by: XxMaSterXx | last post by:
My program Extracts certain urls to a Listbox Example listbox1 urls http://www.thescripts.com/forum/newthread.php?do=newthread&f=132...
5
by: BlackBox | last post by:
I have a Listbox1 in the main form and I can add listbox1 items in the parent form. But when I close the parent form Listbox1 in the main form does not get refresh. I need to re-open the app. ...
3
by: rprasad79 | last post by:
Hi Team, Here goes the scenario... i have a listbox1 which contains continent details. if i select any one of the continent, then the next list box which contains the country list should display...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.