We have a question but we're in doubt if it's even possible or not.
The question is as follows:
Is it possible to access a form using a string literal, and if so yes?
We want to use something like this (don't mind the syntax as it obviously
doesn't work):
Form("Form1") frm = ("Form1")GetFor m("Form1");
So we're able to access all the properties and methods of Form1 and not
just the methods and properties of the base class "Form".
Any help on this one is greatly appreciated!
Gerrit 3 1621
I would think you could try Reflection, for example, see http://www.dotnetbips.com/articles/d...cle.aspx?id=35
but obviouly, you will lose the benefits of static type checking, code will
be hard to debug and the performance may even suffer
Anything else close will be something like dynamic identifiers in the
just-released VB 9 Linq CTP
"Gerrit Snel" wrote: We have a question but we're in doubt if it's even possible or not.
The question is as follows:
Is it possible to access a form using a string literal, and if so yes?
We want to use something like this (don't mind the syntax as it obviously doesn't work):
Form("Form1") frm = ("Form1")GetFor m("Form1");
So we're able to access all the properties and methods of Form1 and not just the methods and properties of the base class "Form".
Any help on this one is greatly appreciated!
Gerrit
Nothing like that will really work. I assume you are talking about running
code typed at runtime or something.
At design time you could just do:
Form1 frm = new Form1
That would give you access to all the properties and methods.
HTH
Ciaran
"Gerrit Snel" <gs************ *@hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. We have a question but we're in doubt if it's even possible or not.
The question is as follows:
Is it possible to access a form using a string literal, and if so yes?
We want to use something like this (don't mind the syntax as it obviously doesn't work):
Form("Form1") frm = ("Form1")GetFor m("Form1");
So we're able to access all the properties and methods of Form1 and not just the methods and properties of the base class "Form".
Any help on this one is greatly appreciated!
Gerrit
OK, thank you all
I try something else i think
"Ciaran" <ci****@theodon nells.plus.com> schreef in bericht
news:43******** **************@ ptn-nntp-reader02.plus.n et... Nothing like that will really work. I assume you are talking about running code typed at runtime or something. At design time you could just do:
Form1 frm = new Form1
That would give you access to all the properties and methods.
HTH
Ciaran
"Gerrit Snel" <gs************ *@hotmail.com> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. We have a question but we're in doubt if it's even possible or not.
The question is as follows:
Is it possible to access a form using a string literal, and if so yes?
We want to use something like this (don't mind the syntax as it obviously doesn't work):
Form("Form1") frm = ("Form1")GetFor m("Form1");
So we're able to access all the properties and methods of Form1 and not just the methods and properties of the base class "Form".
Any help on this one is greatly appreciated!
Gerrit
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Penny |
last post by:
Hi all,
Thanks again guys for the help re Select Case. I might trouble you with
something else:
I use this SQL in the Access query builder to return a single AirRate:
SELECT AirRate FROM tblZoneShippingRates WHERE ZoneName = "Australia"
AND WeightCategory = "250"
|
by: theo |
last post by:
Program flow...load file,then extract the xml text tags from the
file,then the number of
Xml tags retrieved from the file determines the number of dropdownlist
controls
instanciated in the placeholder,the user selects the required tags from
the
dropdownlists (if 5 Xml tags,then 5 dropdownlists each containing 5 xml
tags) and now
the...
|
by: ZillionDollarSadist |
last post by:
Hello,
I'm working at a simple Access '97 + VB4 application, and I ran into a
terrible problem: something I never modified now gives me a totally
unwanted "Invalid use of null" error.
It happens in a Text.LostFocus event, this block:
Do While Not TB6.EOF
If Year(TB6(0)) = Val(Trim(Text1.Text)) Then
!!!!!!!!!!!!!Here!!!!!!!!!
...
|
by: harichinna |
last post by:
Hi to all,
My name is hari, iam trying to delete the column value of spread sheet using c sharp,
iam trying to get the value and compare, when comparing it showing some errors, can any one help me, to slove this issue
i pasted code below
Microsoft.Office.Interop.Excel.Application ObjExcel = new...
|
by: dbonin1599 |
last post by:
I have the following code, the first set of code is the SQL version, the second set of code is an attempt to put the code into a VB String see "UpdateVariations". I need help, I think most of it is fine, but the LIKE statement is the problem, I can't figure out how to get the quotes around the like such as '*Sheriff*' Any help would be great. ...
| |
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...
|
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...
|
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. ...
|
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...
|
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...
|
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...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |