How do i declare a variable in a form if i want to reference to the variable from another form. Below is a code on a form called updatemortalityForm, some variable on this form, i want to make use of them on another form called predictForm. how do i declare these variables so that i can make use of them on another form - Public Class updtmortalityForm
-
Inherits System.Windows.Forms.Form
-
Public vivax1Integer, ovale1Integer, malariae1Integer, falciparum1Integer As Integer
-
Public vivax2Integer, ovale2Integer, malariae2Integer, falciparum2Integer As Integer
-
Public vivax3Integer, ovale3Integer, malariae3Integer, falciparum3Integer As Integer
-
Public pvivax1Decimal, povale1Decimal, pmalariae1Decimal, pfalciparum1Decimal As Decimal
-
Public pvivax2Decimal, povale2Decimal, pmalariae2Decimal, pfalciparum2Decimal As Decimal
-
Public pvivax3Decimal, povale3Decimal, pmalariae3Decimal, pfalciparum3Decimal As Decimal
-
Public nop1Integer, nop2Integer, nop3Integer As Integer
-
Public eregion11Integer, neregion11Integer, eregion21Integer, neregion21Integer, eregion31Integer, neregion31Integer As Integer
-
Public eregion1Decimal, neregion1Decimal, eregion2Decimal,
1 1423
How do i declare a variable in a form if i want to reference to the variable from another form. Below is a code on a form called updatemortalityForm, some variable on this form, i want to make use of them on another form called predictForm. how do i declare these variables so that i can make use of them on another form - Public Class updtmortalityForm
-
Inherits System.Windows.Forms.Form
-
Public vivax1Integer, ovale1Integer, malariae1Integer, falciparum1Integer As Integer
-
Public vivax2Integer, ovale2Integer, malariae2Integer, falciparum2Integer As Integer
-
Public vivax3Integer, ovale3Integer, malariae3Integer, falciparum3Integer As Integer
-
Public pvivax1Decimal, povale1Decimal, pmalariae1Decimal, pfalciparum1Decimal As Decimal
-
Public pvivax2Decimal, povale2Decimal, pmalariae2Decimal, pfalciparum2Decimal As Decimal
-
Public pvivax3Decimal, povale3Decimal, pmalariae3Decimal, pfalciparum3Decimal As Decimal
-
Public nop1Integer, nop2Integer, nop3Integer As Integer
-
Public eregion11Integer, neregion11Integer, eregion21Integer, neregion21Integer, eregion31Integer, neregion31Integer As Integer
-
Public eregion1Decimal, neregion1Decimal, eregion2Decimal,
Create instance of updatemortalityForm in the predictForm.
Using that form's objname access the variable inside that.
Like objUPdateMoralityForm.VariableName
:)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: J |
last post by:
I'm wondering why the form created in the code below stays "alive". I would
have thought that because the form variable is local to the method, that
garbage collection would get rid of it. Makes...
|
by: Dave |
last post by:
I have two forms, Form1 and Form2. From Form2, how do I reference the value
in a control on Form1?
Or perhaps a more specific question: Form1 contains a textbox with the value
of 10. This form...
|
by: martin |
last post by:
Hi,
I am a web page and a web user control. My web user control is placed in my
web page using the following directive
<%@ Register TagPrefix="uc1" TagName="Header"...
|
by: Amelyan |
last post by:
I am struggling here trying to determine what is a good programming practice
as far as referencing your URLs.
When you use Response.Redirect, do you use
1) Hard-coded string --...
|
by: Axel |
last post by:
Hi,
a question about something that seems very simple at first glance:
is it possible to reference other controls of a subform in a query
window without referencing through the parent form? I...
| |
by: libsfan01 |
last post by:
Hi all whats wrong with this script?
i have named a form text box dynamically using php each row has a
textbox called q101, q102 ... etc and i want to make sure my users dont
input a quantity...
|
by: cmd |
last post by:
I have code in the OnExit event of a control on a subform. The code
works properly in this instance. If, however, I put the same code in
the OnExit event of a control on a Tab Control of a main...
|
by: willywonka |
last post by:
Hi again! hope there is no limit to posting newbies questions but this will probably be my last one for a while! I have managed to find some answers to other questions in my mind on here..yippy!
...
|
by: viperRider |
last post by:
Another question to people smarter than me! LOL
I have a form with a variable - Dim cboOriginator as TextBox - that holds the info about a textbox i click on. when i click on it, i have a...
|
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,...
|
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: 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,...
|
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,...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |