473,387 Members | 1,876 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,387 software developers and data experts.

2 Basic questions from a new .NET user

Hi,

I am new in .NET and I have some basic questions.

1 - How can I control a object from another form ? I need to change a
checkbox state from another form. What's the best way to do it ?
2 - What is XML and why do we need it ?

Tanks in advance
Jorge
Jul 21 '05 #1
3 1329
1) You have to provide the other form with a reference to your class. This
can be done a number of ways, such as passing the object into the forms
constructor, or creating some manager class that provides a static reference
to the object so that form can get hold of it.

2) Entire books are written on this subject so I will simply be brief. XML
is a markup language (similar to HTML) where you can define data. Some
people use this format instead of a database for small projects. It is
simply a data repository where you can define whatever structure you want
for the data. It also help to separate the data from the presentation. It
can be used for information exchange among different machine which is how
webservices operate. Can't answer why you would need it because it is
dependent on your project and not all projects "need it".

"Jorge" <jo***********@iol.pt> wrote in message
news:a1**************************@posting.google.c om...
Hi,

I am new in .NET and I have some basic questions.

1 - How can I control a object from another form ? I need to change a
checkbox state from another form. What's the best way to do it ?
2 - What is XML and why do we need it ?

Tanks in advance
Jorge

Jul 21 '05 #2
You should be able to access it via <formname>.<public-form-object>.
"Jorge" wrote:
Hi,

I am new in .NET and I have some basic questions.

1 - How can I control a object from another form ? I need to change a
checkbox state from another form. What's the best way to do it ?
2 - What is XML and why do we need it ?

Tanks in advance
Jorge

Jul 21 '05 #3
For your first question, I would say don't do that. One form should
not access the controls of another. Instead, you should have a class
that holds the values that the form simply reflects. In other words,
you second form should just set a boolean value in either a global
variable or in a class that holds data that both forms could access.
The first form should change its own checkbox to reflect the value of
the data.

Check out the Model View Controller design methodology.

Here's a link: http://tinyurl.com/3398d

Jul 21 '05 #4

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

Similar topics

8
by: Orange Free | last post by:
I want to create a program that will ask a user a series of questions and then generate a Microsoft Word document whose content is dictated by the answers. I am not a professional programmer, and...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
4
by: Ramesh | last post by:
hi, Let me ask some basic questions. Can anybody explain me about the following questions: 1. When we have to create sn key? Whenever we compiled Component we have to create or it is a one time...
5
by: john | last post by:
I searched http://www.sellsbrothers.com. and could not find anything about this subject. How do I make C# User Controls Visible to Visual Basic 6.0 Applications? Thanks, John
1
by: Wiktor Zychla | last post by:
Hello, I am an experienced Win.Forms developer and now I am learning ASP.NET (no ASP background). there are some basic issues I do not understand and cannot find any satisfable answers. 1. my...
3
by: Chris Newby | last post by:
I have a site that is using Basic authentication to validate users against an NT domain. The site has a "log off" feature, however without forcing the browser window to close, I don't know how to...
2
by: Fay Yocum | last post by:
BEWARE beginner questions!! I have some experience in Access but never as much as I want or need. I have decided to get in on VB.Net. I would only rate myself in Access as a...
3
by: JJ | last post by:
I've done a little multi-threading on winform apps some time ago now, so I'm not a complete beginner, but best assume I am for any explanations..: This is an asp.net 2.0 website, using c#: I...
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
1
by: wildman | last post by:
It's been over 10 years that I don't look at Access. I've been working in asp.net for the last 5 developing intranet sites. Just got a project where we are trying to avoid building an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.