473,508 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows - carrying a property value to next form

In Windows app development, how can you carry a property value from one form
to another?

In web development, you would use session.

I have been trying to use properties. I have a class with a property of type
int.
In form 1 i set my property as e.g. 20 but then when i check the value of my
property from form 2, it returns a 0.

How can i transfer accross to form 2 the property value i set in form 1?

thank you
Feb 27 '06 #1
1 1508
CodeRazor,

It depends on you design, but in order to share properties between all
isntances of a class you need to declare the property and/or fields
*static*.
--

Stoitcho Goutsev (100)

"CodeRazor" <Co*******@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
In Windows app development, how can you carry a property value from one
form
to another?

In web development, you would use session.

I have been trying to use properties. I have a class with a property of
type
int.
In form 1 i set my property as e.g. 20 but then when i check the value of
my
property from form 2, it returns a 0.

How can i transfer accross to form 2 the property value i set in form 1?

thank you

Feb 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3736
by: Ron Holmes | last post by:
I want to place a background image on a windows form. Is there a way to prevent the image from Tiling without using an image box resized to the size of the form? I am using Visual Studio 2003...
3
1466
by: Ray | last post by:
I'm sorry this is a long post but I though I had better include everything as I'm new to VB. I have a a form frmCalendarMain which has five subforms (unbound). Each form is a reservation...
2
16158
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643...
5
73178
by: RAJ | last post by:
hi plz tell me how to know "how window is going to close"... i have to right code for X button of forms... plz telll me thanks bye
5
23278
by: VMI | last post by:
How can I increase the maximum size of a Windows form? I'm trying to make a really big Windows form (about 1000x1000) but the designer doesn't allow me to do that. It only goes up to 1000x780....
1
1641
by: Nathan Sokalski | last post by:
I have a problem that is driving me crazy. I have a User Control composed of three DropDownLists that will be used to select a date. I have everything working except for one thing. When I select a...
4
2135
by: Matt | last post by:
I have the following in a page and I am trying to update a record on the next page but for some reason the form data is not carrying over. Any ideas why? <form name=nxtlupdate method=post...
4
4158
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
4
14090
by: Kurrent | last post by:
I have some data from text fields that are being passed over through a form that I am displaying with the $_POST superglobal. Once i have echo'd out this data onto the next page, i'd like to...
0
7226
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,...
0
7125
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...
0
7328
Oralloy
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,...
1
7049
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...
0
5631
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,...
1
5055
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...
0
3199
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...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.