473,569 Members | 2,472 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 1516
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*******@disc ussions.microso ft.com> wrote in message
news:DD******** *************** ***********@mic rosoft.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
3743
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 .NET. This is an easy thing to do in VB6.
3
1478
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 calendar frmCalendarRm1, frmCalendarRm2....Rm5 etc. At the moment if I click on a field which is already booked then I can open the reservation form...
2
16176
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 (possibly white) Can anyone tell me how to convert these colours to either RGB colours or the Long number used by Access. Black is 0 and White is...
5
73194
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
23283
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. Somebody suggested going to the form's Properties >> Layout >> Size 1000,1000 but my version -Studio '02 v1.0- doesn't have that property. Am I missing...
1
1650
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 new value from one of the DropDownLists, the code still returns the old value. You will notice that I try to access the SelectedIndex property in...
4
2140
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 action=supers_NxtlUpdate.asp> <% Do While Not objRecordset.EOF
4
4169
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 check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it...
4
14094
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 continue to use it on the next page. I haven't figured out how to do this properly just yet, but I'm guessing it has something to do with sessions. I...
0
7703
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, 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...
0
7618
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...
0
8132
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7982
tracyyun
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...
0
5222
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...
0
3656
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2116
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
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.