I was working on this walkthrough
( http://msdn.microsoft.com/en-us/library/48cfdff6.aspx) when I came to the
part that says: To create the Calculator component. I found the Project
menu, but I couldn't find the menu item to add a component. Does it mean to
add a class and then to select the component class?
--
Daniel 7 1782
In that same walkthrough, at the part that says: To add public variables to
the Calculator component. Where do I add the lines of code? I mean, within
which set of curly braces, or do I add the code outside of it. The
explanation was not clear.
--
Daniel
"Daniel" <fa*******@falsedomain.netwrote in message
news:A1**********************************@microsof t.com...
>
I was working on this walkthrough
(http://msdn.microsoft.com/en-us/library/48cfdff6.aspx) when I came to the
part that says: To create the Calculator component. I found the Project
menu, but I couldn't find the menu item to add a component. Does it mean
to
add a class and then to select the component class?
--
Daniel
On Sat, 02 Aug 2008 12:57:45 -0700, Daniel <fa*******@falsedomain.net>
wrote:
I was working on this walkthrough
(http://msdn.microsoft.com/en-us/library/48cfdff6.aspx) when I came to
the
part that says: To create the Calculator component. I found the Project
menu, but I couldn't find the menu item to add a component. Does it
mean to
add a class and then to select the component class?
No, it means what it says.
What version of VS are you using? In both VS2005 and VS2008, there is an
"Add Component..." menu item in the "Project" menu. The Express versions
should be the same, but I don't have any installed right now so I can't
verify that.
Pete
On Sat, 02 Aug 2008 13:05:28 -0700, Daniel <fa*******@falsedomain.net>
wrote:
In that same walkthrough, at the part that says: To add public variables
to the Calculator component. Where do I add the lines of code? I mean,
within which set of curly braces, or do I add the code outside of it.
The explanation was not clear.
IMHO, the fact that the sample uses public fields in the class makes me
question just how good a sample it is. It ought to be encouraging you to
use properties for public data for the class.
That said, all members of a class _must_ be declared just like any other:
just within the curly braces surrounding the class declaration.
You will run into the same question for any instruction to add something
to a class, and the answer will always be the same.
Pete
What version of VS are you using? In both VS2005 and VS2008, there is an
"Add Component..." menu item in the "Project" menu. The Express versions
I'm using VS 2008. I don't mean to be argumentative, but I don't see the
"Add Component" menu item. I wonder if I missed something in a previous
step. Do I have to have something selected while I look in the Project
Menu? It refers to the Project Menu at the top of the IDE, not the context
menu right?
Daniel
Perhaps I should show the resulting file. This is the file that is
generated when I add a class of type Component Class to the project. I
already added the lines of code the walkthrough told me to. They all begin
with public... I get errors when I do a build. Does this at least look
like I added a component like I was told to?
--
Daniel
"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Sat, 02 Aug 2008 12:57:45 -0700, Daniel <fa*******@falsedomain.net>
wrote:
>I was working on this walkthrough (http://msdn.microsoft.com/en-us/library/48cfdff6.aspx) when I came to the part that says: To create the Calculator component. I found the Project menu, but I couldn't find the menu item to add a component. Does it mean to add a class and then to select the component class?
No, it means what it says.
What version of VS are you using? In both VS2005 and VS2008, there is an
"Add Component..." menu item in the "Project" menu. The Express versions
should be the same, but I don't have any installed right now so I can't
verify that.
Pete
On Sat, 02 Aug 2008 17:14:18 -0700, Daniel <fa*******@falsedomain.net>
wrote:
Perhaps I should show the resulting file. This is the file that is
generated when I add a class of type Component Class to the project. I
already added the lines of code the walkthrough told me to. They all
begin
with public... I get errors when I do a build. Does this at least look
like I added a component like I was told to?
From the file you posted, it seems possible that you've created a project
of the wrong language type. There are no .h files in C#, so if you added
something to your project that generated a .h file, it seems to me your
project probably isn't a C# project.
Maybe you just need to start from the beginning again, and make sure you
follow the instructions exactly, including any implicit requirements.
They don't seem to explicitly state you need to create a C# project, but
IMHO that's implied in the title of the walkthrough.
Pete
I figured out the problem. I created a C++ Windows Forms Application
project instead of a C# Windows Forms Application. Thanks for your help
nontheless.
--
Daniel
"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Sat, 02 Aug 2008 12:57:45 -0700, Daniel <fa*******@falsedomain.net>
wrote:
>I was working on this walkthrough (http://msdn.microsoft.com/en-us/library/48cfdff6.aspx) when I came to the part that says: To create the Calculator component. I found the Project menu, but I couldn't find the menu item to add a component. Does it mean to add a class and then to select the component class?
No, it means what it says.
What version of VS are you using? In both VS2005 and VS2008, there is an
"Add Component..." menu item in the "Project" menu. The Express versions
should be the same, but I don't have any installed right now so I can't
verify that.
Pete This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chien Lau |
last post by:
I had a situation occur today that's happened a number of times before
and I'd like to get your take on it:
Imagine... You're developing a WinForms app for a client that includes
the use charts....
|
by: orangepic333 |
last post by:
Could someone tell me what's the difference between the two?
Is it that a class is used within an OO language while a component can
be exported between OO languages?
Are there other...
|
by: Edward Diener |
last post by:
How does one specify in a component that a property is a pointer to another
component ? How is this different from a property that is actually an
embedded component ? Finally how is one notified in...
|
by: Jordan Bowness |
last post by:
I make a similar post in another newsgroup, but this example is
simplified somewhat.
I have a component (cmpMyComponent) with 2 properties. The 1st property
is a string value (Description) and...
|
by: AMDRIT |
last post by:
Hello everyone,
I have created a custom component and one of its properties is a class
object with it's own properties. During runtime, I can assign values to the
class object properties just...
|
by: Rob Griffiths |
last post by:
Can anyone explain to me the difference between an element type and a
component type?
In the java literature, arrays are said to have component types, whereas
collections from the Collections...
|
by: Edward Diener No Spam |
last post by:
The definition of a component model I use below is a class which allows
properties, methods, and events in a structured way which can be
recognized, usually through some form of introspection...
|
by: Joe |
last post by:
Is it possible to have a component which is global to the entire
application? I need to have a single component act sort of like a server
which components in any of the forms can access.
For...
|
by: BillGatesFan |
last post by:
I have a web service which calls a .NET queued serviced component in
COM+. I turned statistics on for the component. I call the component
10 times, 10 objects get created but they do not go away....
|
by: bharathreddy |
last post by:
In .Net COM+ components are referred to as serviced components,
Namespace: System.EnterpriseServices;
Advantage of Serviced Components:
object pooling,
database connection pooling,
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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...
|
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,...
|
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...
| |