473,385 Members | 1,661 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,385 software developers and data experts.

Manage toolbox created at runtime

ninodgg
Hi to all,
i just made an form where with button add 10 textbox whith this code:
Expand|Select|Wrap|Line Numbers
  1. For X = 1 To 10
  2.             Me.Controls.Add(tx)
  3.             tx.Visible = True
  4.             tx.Width = 300
  5.             tx.Name = "TxtBox" & X
  6.             tx.Text = tx.Name '"testo che appare nella box" & X
  7.             tx.Location = New Point(300, 30 * X)
  8.  
  9.             AddHandler tx.Click, AddressOf MyKeyPressSub
  10.             Me.Controls.Add(lab)
  11.             lab.Name = "label" & X
  12.             lab.Location = New Point(200, 30 * X)
  13.             lab.Text = "etichetta " & X
  14.  
  15.             tx = New TextBox
  16.             lab = New Label
  17.         Next X
  18.  
now i want write somethings in textbox (i.e. textbox1.value="hello") but no find way, because in code is not defined textbox1, create at runtime (of course).
Some suggest?

Thx to all help
Jun 3 '11 #1

✓ answered by R MacDonald

Hello, ninodgg,

You can use:

Me.Controls("TxtBox1").Text = "hello"

to do this.

Cheers,
Randy

2 1505
Hello, ninodgg,

You can use:

Me.Controls("TxtBox1").Text = "hello"

to do this.

Cheers,
Randy
Jun 3 '11 #2
Dear MacDonald,
Tanks very much... simply but is what i need
Jun 7 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Adam Nowotny | last post by:
I've created library with some "user controls" and they all showed up in the toolbox, so it is easy to drag them to a form in Forms Designer. Now we want to use the controls in our main project...
0
by: Daniel Weinand | last post by:
hi, i'd like to develop an "formular generator". target is that the user can drag and drop different controls to a form. the behavior of this tool should be quite similiar to VS during designtime....
1
by: Paul | last post by:
hello, My application is built in VB6 and i'd like to upgrade to VB.NET and make some fairly large changes at the same time. The application writes a script (simular to VBScript) for the user...
10
by: Nak | last post by:
Hi there, I'm having problems with the Toolbox in VB.NET 2002 Standard. I have 2 class libraries, 1 contains licensing classes and references nothing but standard namespaces and the other...
1
by: Shawn Eary | last post by:
Hello Everyone: I used VB.NET 2003 Standard to create a User Control which I named PersonControl and then overrode its OnLoad routine to use SQL commands to populate its sub-controls. When I...
13
by: Tim | last post by:
When the Application is started, it has to read a config file. The config file gives details of the objects that need to be created. Based on the info from the config file, the objects need to be...
0
by: Rich | last post by:
Hello, I started using the Reportviewer control (very nice) for generating Reporting Services type reports in my VB2005 app. I have been experimenting using a designer Reportviewer control from...
4
by: Jules Winfield | last post by:
I'm using VS2005. I have a solution consisting of twelve projects. All projects are console/service apps except for one which is a WinForms app. There are no web projects. I'd say that I'm at...
5
by: John Kotuby | last post by:
Hi all, This is my first time trying to creaet and use a custome Web Control in a Web Site project in ASP.NET 2.0 with VS 2005 and VB. I created the control in a separate Web Control Library...
9
by: sejal17 | last post by:
hi all, To upload image i want to make an folder of username using which user is login and put image in that folder thanks
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.