R
Robert Meek
I'm using VS 2005 with the Chrome add-on to write NET applications in
Object Pascal. But my questions are very basic and no language specific so
I'm hopeful someone here can help me.
1. I'm not sure I understand the relation of the References section of
the Solution Explorer. I thought that any Namespaces added here were then
automatically used by all units in the project, but if this is true, then
why do they also have a project option allowing you to set default
Namespaces, and why are many of the Namespaces in the References section
shown redundantly in each unit's uses section?
2. When I create a new windows form and VS creates the file and adds it
to my project, I am assuning that an instance of this Windows Form is NOT
automatically
created when the app is first started. Now if I wish to access and/or
create a new instance of this new form from a button click event on the
MainForm, shouldn't I need to add the new Form's pas file to my uses section
of the MainForm? I tried but could not do so. What I was able to do
however, is add a variable to my MainForm's public section: Var MyNewForm :
MyNewForm; and then I was able to test in my Mainform's button click to see
if it had been assigned yet. If not I create it, and if so I just Show it.
But what if I also want to access this new Form from another Form
altogether? I shouldn't have to create a new var instance. I just may wish
to access something on the New Form after it was created and shown from my
MainForm. How do I add it to my 3rd form's uses section so that it is
accessible from there?
3. In Delphi, which I used to program in, we had the TIniFile class which
allowed you to read and write text-based IniFiles in which application
configuration data could be written and read. So for example if I wanted to
store the last position and size the user left a particular Form in when he
closed the application I could write that info into my Inifile as integer
values, and then upon the next startup I could read these integers and set
the Form back to the same position and size again. With NET what namespace
do in use, what kind of document, and what class to read/write such info? I
would need to be able to work with Strings, Booleans, DateTimes, Integers,
and a few other types.
4. Finally, in the project options there is a setting for the creation of
xml Documentation. I believe this is supposed to create an xml file of all
comments I add to my code, but so far I have not been able to find any such
file. What do I need to do to create and work with this xml file?
I've looked and looked in the help but I've come up empty on these
things, so i would greatly appreciate any help you can give!
Object Pascal. But my questions are very basic and no language specific so
I'm hopeful someone here can help me.
1. I'm not sure I understand the relation of the References section of
the Solution Explorer. I thought that any Namespaces added here were then
automatically used by all units in the project, but if this is true, then
why do they also have a project option allowing you to set default
Namespaces, and why are many of the Namespaces in the References section
shown redundantly in each unit's uses section?
2. When I create a new windows form and VS creates the file and adds it
to my project, I am assuning that an instance of this Windows Form is NOT
automatically
created when the app is first started. Now if I wish to access and/or
create a new instance of this new form from a button click event on the
MainForm, shouldn't I need to add the new Form's pas file to my uses section
of the MainForm? I tried but could not do so. What I was able to do
however, is add a variable to my MainForm's public section: Var MyNewForm :
MyNewForm; and then I was able to test in my Mainform's button click to see
if it had been assigned yet. If not I create it, and if so I just Show it.
But what if I also want to access this new Form from another Form
altogether? I shouldn't have to create a new var instance. I just may wish
to access something on the New Form after it was created and shown from my
MainForm. How do I add it to my 3rd form's uses section so that it is
accessible from there?
3. In Delphi, which I used to program in, we had the TIniFile class which
allowed you to read and write text-based IniFiles in which application
configuration data could be written and read. So for example if I wanted to
store the last position and size the user left a particular Form in when he
closed the application I could write that info into my Inifile as integer
values, and then upon the next startup I could read these integers and set
the Form back to the same position and size again. With NET what namespace
do in use, what kind of document, and what class to read/write such info? I
would need to be able to work with Strings, Booleans, DateTimes, Integers,
and a few other types.
4. Finally, in the project options there is a setting for the creation of
xml Documentation. I believe this is supposed to create an xml file of all
comments I add to my code, but so far I have not been able to find any such
file. What do I need to do to create and work with this xml file?
I've looked and looked in the help but I've come up empty on these
things, so i would greatly appreciate any help you can give!