473,811 Members | 4,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Manage toolbox created at runtime

ninodgg
3 New Member
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
2 1521
R MacDonald
24 New Member
Hello, ninodgg,

You can use:

Me.Controls("Tx tBox1").Text = "hello"

to do this.

Cheers,
Randy
Jun 3 '11 #2
ninodgg
3 New Member
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
1904
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 which is located on another computer. The problem is they don't show up in the toolbox. What's wrong ? -- Adam
0
976
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. that means, adding controls, the ability to change size and position of the controls. for now only text relevant controls are needed. i have no idea how to do that. can the design time behavior of controls be used during runtime?
1
1080
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 based on their selection from combo boxes and entries into text boxes etc, the script is then used in a seperate application. The app basically makes it easy for someone who cannot code to create that code from english language expressions.
10
1540
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 references my first library in order to protect the exposed components. To make things easier I'll refer to my licensing library as licensinglibrary.dll and my control library as controllibrary.dll. When I try to add mycontrollibrary to the toolbox...
1
1667
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 tried to use the Form Designer to add my PersonControl to a form in my application, I got the following error dialog box: Title: Microsoft Development Environment Text: The ConnectionString property has not been initialized.
13
4032
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 instantiated at run time and its methods have to be invoked. How do I do this? Is reflection the only way to do it? Is there any other way?
0
2013
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 the toolbox - created at design time - (VB2005) and also creating a Reportviewer control at runtime on the fly. The runtime Reportviewer will populate/display data with a runtime dataAdapter, but the designer Reportviewer from the toolbox is...
4
2154
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 around 125k-150k lines of code in total. My development machine has 2gigs of physical RAM, a hyperthreaded CPU running at 3.6ghz, and plenty of harddrive space on a recently defragged drive. The only installed apps are VS2005 and SQL Server 2005....
5
3755
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 project. The original code for that control was written in VS 2003 for .NET 1.1. I created a Web Project and pulled the VB module into the project. I compared the syntax to the VB template classs that was built and it looked very similar. I then...
9
1560
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
9724
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10644
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10127
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.