473,433 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,433 software developers and data experts.

Passing data between forms

Is it possible to pass data between forms as you pass parameters into a
function?

I know I can add a class and members as to share data, or create a module
with public variables, is this the best solution though?
Adrian
Jul 17 '05 #1
3 13535

"Adrian Parker" <ad***********@NOSPAMsympatico.ca> skrev i en meddelelse
news:LZ*******************@news20.bellglobal.com.. .
Is it possible to pass data between forms as you pass parameters into a
function?

I know I can add a class and members as to share data, or create a module
with public variables, is this the best solution though?

Yes you can.......but remember to make Variables PUBLIC
If you have a Form1 with a public variable called TEST then you
can acces the variable on Form2 with this :
Form1.Test

If you have a Text1.Text on Form1 you can access it on Form2 with this:
Form2.Text1.Text

Adrian

Jul 17 '05 #2

"Steen Gellett" <He*******@NoSpam.Net> skrev i en meddelelse
news:40**********************@dread14.news.tele.dk ...

"Adrian Parker" <ad***********@NOSPAMsympatico.ca> skrev i en meddelelse
news:LZ*******************@news20.bellglobal.com.. .
Is it possible to pass data between forms as you pass parameters into a
function?

I know I can add a class and members as to share data, or create a module with public variables, is this the best solution though?

Yes you can.......but remember to make Variables PUBLIC
If you have a Form1 with a public variable called TEST then you
can acces the variable on Form2 with this :
Form1.Test

If you have a Text1.Text on Form1 you can access it on Form2 with this:
Form2.Text1.Text


UPS.....it must be Form1.Text1.Text


Adrian


Jul 17 '05 #3
"Adrian Parker" <ad***********@NOSPAMsympatico.ca> wrote
Is it possible to pass data between forms as you pass parameters into a
function? I know I can add a class and members as to share data ...


A form is a class, and more. A form has a private module part (like a class)
and a visual part (the User Interface). The private module part can have
public routines and properties, just like a class. So, anything (within reason)
you do with a class, can be done with a form. If Properties will work, you
can do that. If passing several parameters to a sub will work, you can do
that too. The main thing to watch out for is to be sure you have control
over, (and keep track of) the instances you create....

LFS

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 17 '05 #4

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

Similar topics

8
by: Alex Vinokur | last post by:
Various forms of argument passing ================================= C/C++ Performance Tests ======================= Using C/C++ Program Perfometer...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
2
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text,...
11
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
8
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
5
by: Rod | last post by:
I've written 2 ASP.NET applications (I've worked on one with a team and another by myself). In my ASP.NET pages, when saving data to a backend database I've done it by using the click event of a...
0
by: Eric Sabine | last post by:
OK, I'm trying to further my understanding of threading. The code below I wrote as kind of a primer to myself and maybe a template that I could use in the future. What I tried to do was pass data...
2
by: Carl Heller | last post by:
Working in VS2003, .Net 1.1 I'm working on a project where I compare data between two databases. This is a lengthy process, and very data intensive, so I decided to create a class, and thread...
1
by: SteveDouglas | last post by:
Hi all, I am currently writing an application in VB.NET that has a lot of controls (treeviews/listviews/labels and so forth) that represent "things" that need to be draggable from place to place,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...
1
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
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
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.