473,785 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET: Sending commands to runtime-created objects

3 New Member
Hi, I have a problem but cannot figure out a good solution to it.

I am trying to create a form that creates a bunch of panels during runtime, and I want to be able to send commands (such as false visibility, etc) to the panels also during runtime.

Once I create a bunch of panels (each using the same 'creation' code), how can I call them up again to send commands to them?
I figure I can add them to an array and call them using:
Expand|Select|Wrap|Line Numbers
  1. arrayObjects(2).visible = false
etc, but this results in a 'reference/instance' vb error.

Is this bad coding, or am I missing something completely?

I seem to remember (i think it was with actionscript 2.0 coding) that you can call objects in this sort of way:

Expand|Select|Wrap|Line Numbers
  1. ["panel" & 4].visible = false
Is there this sort coding option in .NET?
I can't figure out another method (other than the array one, which isnt working for me anyway) to call a runtime created object, because if I create an panel like so:
Expand|Select|Wrap|Line Numbers
  1. dim pnl as new Panel
  2. pnl.Name = "panel" & i     'for example, i = 3 at this stage, for the 3rd panel
how to I then call it later on to send commands to it?

Thankyou, I am still a programming amateur and want to jump this hurdle :-P
Mar 3 '08 #1
0 996

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

Similar topics

3
8010
by: Hal Vaughan | last post by:
I need to be able to run external commands from within a Java program, on Linux and Windows (and eventually OSX). Under most circumstances there is no problem, but if the path I specify as part of the command has any spaces in it, or an argument for the command is a path with a space in it, or if I redirect the output to a file with a space in the filename, it doesn't work on Linux. I tried putting the paths in both single and double...
77
13285
by: Tim Anderson | last post by:
I've begun to set down some pros and cons here: http://www.itwriting.com/phorum/list.php?f=6 Thought I'd mention it as it's a topic of such enduring interest :-) Tim
0
2112
by: Ghost | last post by:
Hello. I have such question: I want to create SqlCeDataAdapter object at runtime... I'm writing: SqlCeDataAdapter dataAdapter = new SqlCeDataAdapter(); then I specify Select Command: dataAdapter.SelectCommand = new SqlCeCommand("SELECT * FROM Supplier",
1
4894
by: Joey Lee | last post by:
Hi, I am trying to send mail thru outlook. I have found some code on the web and ws trying it out. I was successful in creating a mail in the draft folder of outlook, however hangs for a long time during the sending of the mail. Snippet code as below ------------------------------------------- using Outlook = Microsoft.Office.Interop.Outlook; //using the 11.0 object
15
2711
by: Jim Hubbard | last post by:
Is it possible to emulate a monitor (create a virtual monitor) using vb.net? Any code snippets or pointers to helpful articles would be very much appreciated.
1
3772
by: Jonathan Amend | last post by:
I'm trying to port some C++ code to VB.NET but I have hit a snag. I need to add the pointer of a structure which includes an array to an array and then pass it to an API. Here are the two code snippets: long inbuf; // Array that gets passed to the API struct cmbuf { short cmds; long cm2; } cbuf; // Structure whos pointer must be added to inbuf cbuf.cmds = 0;
9
8337
by: craig.overton | last post by:
All, I am currently developing an FTP class in VB.NET. It's kid tested, mother approved when trying to access an FTP Server on a Windows box meaning I can connect, run commands, upload and download a file no problem. My issues come when I try to use the same class with the same commands to access an FTP server on a UNIX box. I can connect and login just fine, but after that all my commands come back "500 'PWD': command not understood."....
8
4158
by: Amol | last post by:
Hi , I am developing a web application.I need an interface in my application which will allow the user to send the fax domestic /international.I dont want to use 3rd party tool /service .Does anybody have idea how to achieve this functonality. Regards amol
0
965
by: sajithamol | last post by:
Can anyone please tell me how to implement AT commands in .NET for sending and receiving SMS through GSM modem/mobile connected to a PC.
2
989
by: erbilkonuk | last post by:
Hi everyone, I have been developing a project that is composed of one windows service and one ASP.NET web site. The windows service and ASP.NET web site reside on the same server. I want to send start/stop service commands and custom commands to the Windows service from ASP.NET Web site. What I have done is : * I read in a site that an web site user get credential of a user "Network Service" at the server so I run the service with...
0
9645
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
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8974
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
7500
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
5381
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...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.