I have been writing a datalogging application. It reads in double's
into a database. I want to be able to click on a row in a database
(holds name of variable and also current value of variable) and then
instantiate a new form.
I created a new form form2 and then just on double click on a
button....
dim form as new form2
form.show
this allows me to create individual forms which I feed particular
variables.
now the issue for me is, how do i refer to each instance of form2
(want to be able to create form instances dynamically) individually.
i want to be able to send updated data from the database to each
window instance so that I can display multiple pieces of information
in individual scaleable windows..
is there a way to refer to a single instance of a new form? 6 1793
Savante,
Each time you create a new form you could add it to a collection, such as an
array, arraylist, list, hashtable, dictionary, etc.
Then you could refer to it by using an index or key.
Kerry Moorman
"Savante" wrote:
I have been writing a datalogging application. It reads in double's
into a database. I want to be able to click on a row in a database
(holds name of variable and also current value of variable) and then
instantiate a new form.
I created a new form form2 and then just on double click on a
button....
dim form as new form2
form.show
this allows me to create individual forms which I feed particular
variables.
now the issue for me is, how do i refer to each instance of form2
(want to be able to create form instances dynamically) individually.
i want to be able to send updated data from the database to each
window instance so that I can display multiple pieces of information
in individual scaleable windows..
is there a way to refer to a single instance of a new form?
On Apr 13, 1:20 pm, Kerry Moorman
<KerryMoor...@discussions.microsoft.comwrote:
Savante,
Each time you create a new form you could add it to a collection, such as an
array, arraylist, list, hashtable, dictionary, etc.
Then you could refer to it by using an index or key.
Kerry Moorman
"Savante" wrote:
I have been writing a datalogging application. It reads in double's
into a database. I want to be able to click on a row in a database
(holds name of variable and also current value of variable) and then
instantiate a new form.
I created a new form form2 and then just on double click on a
button....
dim form as new form2
form.show
this allows me to create individual forms which I feed particular
variables.
now the issue for me is, how do i refer to each instance of form2
(want to be able to create form instances dynamically) individually.
i want to be able to send updated data from the database to each
window instance so that I can display multiple pieces of information
in individual scaleable windows..
is there a way to refer to a single instance of a new form?- Hide quoted text -
- Show quoted text -
thanks for the reply.
I had a bash at this last night again - had a module with
dim arrayform(100) as form1 ' (form1 is the copy of the data display
window)
and then when I click a button in frmmain it goes somthing like.
public sub button1.click......
i+=1
arrayform(i)=new form
arrayform(i).show
is this what you mean? It seems to allow me to refer to particular
windows now I think. I was going to adjust the form1_closing such
that it simply hides the window rather than deletes it and then use
the value of i as a key to identify when tooo many form1 instances
were open?
Best Regards,
Grant
Grant,
Yes, that is one of the approaches that I was suggesting.
Another option would be to add each form to an arraylist or list. Then you
would not have to manage the size of the collection. Each new form could be
added to the collection without having to keep track of the size of the
collection or the index value, etc.
Kerry Moorman
"Savante" wrote:
>
thanks for the reply.
I had a bash at this last night again - had a module with
dim arrayform(100) as form1 ' (form1 is the copy of the data display
window)
and then when I click a button in frmmain it goes somthing like.
public sub button1.click......
i+=1
arrayform(i)=new form
arrayform(i).show
is this what you mean? It seems to allow me to refer to particular
windows now I think. I was going to adjust the form1_closing such
that it simply hides the window rather than deletes it and then use
the value of i as a key to identify when tooo many form1 instances
were open?
Best Regards,
Grant
Kerry,
Cheers,
How do I do that? :-(
in module -
dim grantform as arraylist?
and then in the class........
grantform as new form1
grantform.show?
how do I keep track of each instance of each form as it's
instanciated?
Best Regards,
Grant
On Apr 14, 4:34 pm, Kerry Moorman
<KerryMoor...@discussions.microsoft.comwrote:
Grant,
Yes, that is one of the approaches that I was suggesting.
Another option would be to add each form to an arraylist or list. Then you
would not have to manage the size of the collection. Each new form could be
added to the collection without having to keep track of the size of the
collection or the index value, etc.
Kerry Moorman
"Savante" wrote:
thanks for the reply.
I had a bash at this last night again - had a module with
dim arrayform(100) as form1 ' (form1 is the copy of the data display
window)
and then when I click a button in frmmain it goes somthing like.
public sub button1.click......
i+=1
arrayform(i)=new form
arrayform(i).show
is this what you mean? It seems to allow me to refer to particular
windows now I think. I was going to adjust the form1_closing such
that it simply hides the window rather than deletes it and then use
the value of i as a key to identify when tooo many form1 instances
were open?
Best Regards,
Grant- Hide quoted text -
- Show quoted text -
Kerry,
This opens up another can of worms. I've done the following
in module - friend formlist as arraylist
in each instance of opening a new form I've gone
dim instanceform as form
instanceform=new form
formlist.add(instanceform)
and so I'm presuming that this adds each instance of the form
instantiation to arraylist at a unique index position.
I would like to be able to change values in each instance of the form
using database values, but my question is how do I address the (for
example) label1.text parameter of each particular instance of the
form?
formlist(1).label1.text="whatever data I like". . . . .?
On Apr 15, 2:00 pm, "Savante" <grant.thom...@savante.co.ukwrote:
On Apr 14, 4:34 pm, Kerry Moorman
<KerryMoor...@discussions.microsoft.comwrote:
Grant,
Yes, that is one of the approaches that I was suggesting.
Another option would be to add each form to an arraylist or list. Then you
would not have to manage the size of the collection. Each new form could be
added to the collection without having to keep track of the size of the
collection or the index value, etc.
Kerry Moorman
"Savante" wrote:
thanks for the reply.
I had a bash at this last night again - had a module with
dim arrayform(100) as form1 ' (form1 is the copy of the data display
window)
and then when I click a button in frmmain it goes somthing like.
public sub button1.click......
i+=1
arrayform(i)=new form
arrayform(i).show
is this what you mean? It seems to allow me to refer to particular
windows now I think. I was going to adjust the form1_closing such
that it simply hides the window rather than deletes it and then use
the value of i as a key to identify when tooo many form1 instances
were open?
Best Regards,
Grant- Hide quoted text -
- Show quoted text -
Kerry,
This opens up another can of worms. I've done the following
in module - friend formlist as arraylist
in each instance of opening a new form I've gone
dim instanceform as form
instanceform=new form
formlist.add(instanceform)
and so I'm presuming that this adds each instance of the form
instantiation to arraylist at a unique index position.
I would like to be able to change values in each instance of the form
using database values, but my question is how do I address the (for
example) label1.text parameter of each particular instance of the
form?
formlist(1).label1.text="whatever data I like". . . . .?- Hide quoted text -
- Show quoted text -
awesome!! thanks! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Daylor |
last post by:
in win32 process , when u create new process,u have new main thread.
i know,appDomain r logical procces,that exists in 1 win32 process.
the q:
is there way to create second appDomain (the...
|
by: fchef |
last post by:
I am looking for some advice on working with Multiple frame instances.
Essentially I need to be able to refer to specific control values in a
frame and be able to hide/show a specific frame. In VB...
|
by: (Pete Cresswell) |
last post by:
I know I can open many instances of a given form, but I've never done it.
Now I'm analyzing an application where that seems like just the ticket: Many
investment funds, *lots* of data points for...
|
by: Helen Trim |
last post by:
I have an application with three forms that are msde
visible and activated when needed. It uses Word to open
documents and one of the forms is opened as the Word
document is closed in the...
|
by: GGerard |
last post by:
Hello
I have a program where the user can open as many instances of a form as the
user wants.
The only limit to how many instances can be opened is determined by the
limit of the computer...
|
by: c676228 |
last post by:
Hi everyone,
my colleagues are thinking about have three insurance plans on one asp page:
I simplify the plan as follow:
text box:number of people
plan1 plan2 plan3
|
by: Neil |
last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message
news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com...
Question for you. I'm doing something similar, only, instead of opening...
|
by: nottarealaddress |
last post by:
I'm trying to get my feet wet in VB2005 (our new standard at work
after officially stopping new development in VB6 about a month ago).
I'm working with a simple sql 2005 table of 50 entries, one...
|
by: pgrazaitis |
last post by:
I cant seem to get my head wrapped around this issue, I have myself so
twisted now there maybe no issue!
Ok so I designed a class X that has a few members, and for arguments
sake one of the...
|
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: 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...
|
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...
|
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...
|
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,...
| |