Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Could someone clarify 'why' this worked out the way it did...

Posted on 2006-07-11
7
Medium Priority
?
168 Views
Last Modified: 2006-11-18
I completed a hands-on project from a textbook I'm reading.

The purpose was to create a composite user control (containing identifying labels and text boxes) referencing a "Person" structure.

Now, it 'worked' okay, but only after I made one minor change to my container form:

The book's solution calls for the form's OK button procedure to be:

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        'Retrieve the entered information
        Dim perPerson As Person

        perPerson = NameEntry.PersonText
        MessageBox.Show( _
        perPerson.id & ControlChars.NewLine & _
        perPerson.Name & ControlChars.NewLine & _
        perPerson.address & ControlChars.NewLine & _
        perPerson.city & ", " & perPerson.state & _
        " " & perPerson.zip, "Display Entered Information")
    End Sub

Where mine ended up 'having' to be:

   Dim perPerson as Person.Person

How come?
0
Comment
Question by:sirbounty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 1000 total points
ID: 17082863
The first Person is the namespace, which would suggest that the Person class is in a different namespace to the Form.
0
 
LVL 67

Author Comment

by:sirbounty
ID: 17082971
So, I didn't do what I was instructed to do?  Hmmm - let me check again...
0
 
LVL 67

Author Comment

by:sirbounty
ID: 17083183
Rootspace for "Person" is
Ch12HandsOn
for frmDataEntry is
Ch12HandsOn

This obtained by right-clicking each project and choosing properties...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 67

Author Comment

by:sirbounty
ID: 17083272
I recreated from scratch and still have the same symptoms...
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17083535
Is there any additional namespace defined for the Person class other than the root namespace ?
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 17083536
i.e.

Anything like:

    Namespace Person
        Public Class Person
        End Class
    End Namespace

?
0
 
LVL 67

Author Comment

by:sirbounty
ID: 17083570
I searched the entire projects for "names" (namespace) and it came up empty.
I don't know.  This was supposed to be a 'learn how to do it before you actually do' example.
I'm just a bit discouraged that the meat of the text never dealt with this issue and then right there at the last example, it was dropped in there.  <sigh>
I've given up on it and moved on to my actual assignment.  Thanx anyway - points are yours for the attempt.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question