Hi,
Can I NOT from Form class get information about form's properties,
control located on the form , etc? I would like to do it from any
module at my project .
Thanks 3 831
Mike wrote: Hi,
Can I NOT from Form class get information about form's properties, control located on the form , etc? I would like to do it from any module at my project .
Thanks
Mike,
If you have an instance of your form referenced in a variable, you can
access all of its public members. If you want to expose private or protected
members, you'll need to wrap them with custom public members.
If you don't have a reference, you can access only Public Shared members and
Public constructors.
- Pete
"AirPete" <x@x.x> wrote in message news:<3Z*******************@newsread2.news.pas.ear thlink.net>... Mike wrote: Hi,
Can I NOT from Form class get information about form's properties, control located on the form , etc? I would like to do it from any module at my project .
Thanks
Mike,
If you have an instance of your form referenced in a variable, you can access all of its public members. If you want to expose private or protected members, you'll need to wrap them with custom public members. If you don't have a reference, you can access only Public Shared members and Public constructors.
- Pete
Pete,
Thanks for your answer . I already use reference and do exactly what
you said
I not good formulated my question: does .Net contain collection that
has information about all forms and modules at my project
(application).
And when I get element from that collection I can get access to public
properties and method of the any particular form.
Thanks
[snip]
Mike wrote: Pete, Thanks for your answer . I already use reference and do exactly what you said
I not good formulated my question: does .Net contain collection that has information about all forms and modules at my project (application). And when I get element from that collection I can get access to public properties and method of the any particular form.
Thanks
Check out the System.Reflection namespace, especially the Assembly class and
its static/shared GetExecutingAssembly method. Then you can use its GetTypes
method to get that info.
Example (pseudocode, not tested):
Dim this as Assembly = Assembly.GetExecutingAssembly()
Dim types() as Type = this.GetTypes()
Dim typec as Type
For each typec In types
Console.WriteLine(type.Name)
Next
This should print a list of all types in your project.
- Pete This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Timppa |
last post by:
Hi,
I have Access 2000 and now I'm converting .mdb database to .adp and Sql Server 2000.
In old .mdb application I have a query which handles msysobjects table
(reading forms and reports...
|
by: Damien Ramsey |
last post by:
hello there
Info: I have a form on which is displayed information, customer code,
address and balance etc..
on that form i also have start of the current week, which is
displaying 29th march...
|
by: Roy Gourgi |
last post by:
Hi,
I am used to working in Visual FoxPro and I would like to be able to create
a database and store and retrieve information from it. What is the simplest
way to do it and what should I be...
|
by: Sway |
last post by:
Hi. I have a little bit of a problem. I'm working on a school project and can't figure this one thing out. I have a program that has 21 forms, the first one being the home page and the others being...
|
by: Tom |
last post by:
I am writing a Windows service in VB.NET... I am using two applicatons
- the actual service, and then an additional 'control app' (Windows
Forms) that can be used to stop, start, monitor, etc the...
|
by: forest demon |
last post by:
for example, let's say I do something like,
System.Diagnostics.Process.Start("notepad.exe","sample.txt");
if the user does a SaveAs (in notepad), how can i capture the path that
the user...
|
by: Altius |
last post by:
Access Version: 2003
OS: XP Pro
Sorry if this is a bit long winded. First a little info about the database. This database is used to keep track of checkout information from our production...
|
by: mdk7 |
last post by:
I am very new to developing forms and queries with Access. The task that I am required to complete is as follows:
Build a form based user interface that displays various information from the...
|
by: orangekeeper |
last post by:
Hi Guys,
Sorry, I'm a bit dim here but can anyone advise on the following?
I'm looking at writing a VB script from Excel that opens a particular web page, logs in, selects a particular link and...
|
by: raylopez99 |
last post by:
Keywords: scope resolution, passing classes between parent and child
forms, parameter constructor method, normal constructor, default
constructor, forward reference, sharing classes between forms....
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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...
| |