Loading ...
Sorry, an error occurred while loading the content.

RE: [C#.NET] Graphics map

Expand Messages
  • Ian Moores
    On what platform?? If it s web, then don t try and reinvent the wheel, use ImageMap HTML, it works very well in IE, although never tried through anything else.
    Message 1 of 6 , Dec 1, 2004
    View Source
    • 0 Attachment
      On what platform??

      If it's web, then don't try and reinvent the wheel, use ImageMap HTML, it
      works very well in IE, although never tried through anything else. If you're
      not familiar with this there is a very simple one with a map of the UK on
      one http://www.fpfaraday.com/Regional.aspx. This one does not display
      anything in the status bar, but it would be failry easy to hook that in, and
      there are plenty of examples on the web.

      If it was for a windows application you would proberbly be best using the
      PictureBox.MouseMove event and looking at the x, y co-ordinates and then
      doing what you want from in there.

      Hope that's of help

      Ian


      >
      >
      >Fairly new to C# so bear with me.
      >
      >Take a map of the US's states.
      >When the mouse clicks on or hovers over a state it
      >would give info on a status bar or something.
      >
      >I am guessing I need some sort of graphic mapping and
      >just wanted your thoughts on the best way to go about
      >this.
      >
      >This is purely a learning exercise for me so all ideas
      >welcome.
      >
      >Thanks,
      >
      >Bill
      >
      >
      >
      >
      >
      >
      >
      >__________________________________
      >Do you Yahoo!?
      >The all-new My Yahoo! - Get yours free!
      >http://my.yahoo.com
      >
      >
      >
      >
      >
    • Bill Norton
      Trust me I don t want to reinvent anything! :-) My bad, I was referring to a windows application. With regards to the pictureBox and MouseMove is this the
      Message 2 of 6 , Dec 1, 2004
      View Source
      • 0 Attachment
        Trust me I don't want to reinvent anything! :-)

        My bad, I was referring to a windows application.

        With regards to the pictureBox and MouseMove is this
        the standard way to do maps and such?

        Are there another ways?

        Thanks

        Bill


        --- Ian Moores <i_moores@...> wrote:

        > On what platform??
        >
        > If it's web, then don't try and reinvent the wheel,
        > use ImageMap HTML, it
        > works very well in IE, although never tried through
        > anything else. If you're
        > not familiar with this there is a very simple one
        > with a map of the UK on
        > one http://www.fpfaraday.com/Regional.aspx. This one
        > does not display
        > anything in the status bar, but it would be failry
        > easy to hook that in, and
        > there are plenty of examples on the web.
        >
        > If it was for a windows application you would
        > proberbly be best using the
        > PictureBox.MouseMove event and looking at the x, y
        > co-ordinates and then
        > doing what you want from in there.
        >
        > Hope that's of help
        >
        > Ian
        >
        >
        > >
        > >
        > >Fairly new to C# so bear with me.
        > >
        > >Take a map of the US's states.
        > >When the mouse clicks on or hovers over a state it
        > >would give info on a status bar or something.
        > >
        > >I am guessing I need some sort of graphic mapping
        > and
        > >just wanted your thoughts on the best way to go
        > about
        > >this.
        > >
        > >This is purely a learning exercise for me so all
        > ideas
        > >welcome.
        > >
        > >Thanks,
        > >
        > >Bill
        > >
        > >
        > >
        > >
        > >
        > >
        > >
        > >__________________________________
        > >Do you Yahoo!?
        > >The all-new My Yahoo! - Get yours free!
        > >http://my.yahoo.com
        > >
        > >
        > >
        > >
        > >
        >
        >
        >




        __________________________________
        Do you Yahoo!?
        The all-new My Yahoo! - What will yours do?
        http://my.yahoo.com
      • Paul Cowan
        Hi all, Can anyone which is the correct defintion of ToArray public new Subject[] ToArray() { int num1 = base.Count - 1; Subject[] subjectArray1 = new
        Message 3 of 6 , Dec 1, 2004
        View Source
        • 0 Attachment
          Hi all,

          Can anyone which is the correct defintion of ToArray

          public new Subject[] ToArray()
          {
          int num1 = base.Count - 1;
          Subject[] subjectArray1 = new Subject[num1];
          base.CopyTo(subjectArray1);
          return subjectArray1;
          }


          or

          public new Subject[] ToArray()
          {
          int num1 = base.Count;
          Subject[] subjectArray1 = new Subject[num1];
          base.CopyTo(subjectArray1);
          return subjectArray1;
          }

          The bit I am querying is:

          whether it is:

          int num1 = base.Count - 1;
          Subject[] subjectArray1 = new Subject[num1];

          or:

          int num1 = base.Count;
          Subject[] subjectArray1 = new Subject[num1];

          Thanks

          Paul
        • Ian Moores
          This one is correct int num1 = base.Count; Subject[] subjectArray1 = new Subject[num1];
          Message 4 of 6 , Dec 1, 2004
          View Source
          • 0 Attachment
            This one is correct

            int num1 = base.Count;
            Subject[] subjectArray1 = new Subject[num1];

            >
            >Hi all,
            >
            >Can anyone which is the correct defintion of ToArray
            >
            > public new Subject[] ToArray()
            > {
            > int num1 = base.Count - 1;
            > Subject[] subjectArray1 = new Subject[num1];
            > base.CopyTo(subjectArray1);
            > return subjectArray1;
            > }
            >
            >
            >or
            >
            > public new Subject[] ToArray()
            > {
            > int num1 = base.Count;
            > Subject[] subjectArray1 = new Subject[num1];
            > base.CopyTo(subjectArray1);
            > return subjectArray1;
            > }
            >
            >The bit I am querying is:
            >
            >whether it is:
            >
            > int num1 = base.Count - 1;
            > Subject[] subjectArray1 = new Subject[num1];
            >
            >or:
            >
            > int num1 = base.Count;
            > Subject[] subjectArray1 = new Subject[num1];
            >
            >Thanks
            >
            >Paul
            >
            >
          • kevin.aubuchon@charter.net
            There are Count items in the array. The first and last index is 0 and Count-1. To copy the entire array, copy Count items, not Count -1. You might be
            Message 5 of 6 , Dec 1, 2004
            View Source
            • 0 Attachment
              There are "Count" items in the array. The first and last index is 0 and Count-1. To copy the entire array, copy Count items, not Count -1. You might be confusing bounds with the number of items.

              Hope that helps

              kevin aubuchon
              www.aubuchon-design.com

              >
              > From: "Paul Cowan" <dagda1@...>
              > Date: 2004/12/01 Wed PM 03:23:50 GMT
              > To: CSharpNET@yahoogroups.com
              > Subject: [C#.NET] ToArray
              >
              >


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.