Ok Here is my situation, I am writing a class that is used to convert between various GPS Coordinate Systems, To do this, the use can select a Datum which changes 2 values that are used in the calcualtions.
ie
Datum
Name = "NAD83/WGS84 (Global)"
a = 6378137
b = 6353752.3142
etc...
What I have now is a structure that is defined as so
VB Code:
Public Structure Datum
Dim Name As String
Dim a As Double
Dim b As Double
End Structure
what I am wondering is this, Is it possible to set up a custom type of sorts with 3 values, (name, a and b) so that I could do something like this
VB Code:
Public Property Datum() as DatumType
Get
Return DatumType.Name
End Get
Set(ByVal value As Double)
DatumType.Name = value
End Set
End Property
Essentially what I want to happen is that when you go to set the property when using this class and you create a new instance, I want the Datum Property to give you a list of specific items that you can pick from that will then set the values of a anb b in the class
VB Code:
Dim gps As New ConvertGPS
gps.Datum = 'have this show a predefined list of my datums to set the property
I hope that I have been clear about this and thank you for any help
Last edited by bmahler; Oct 25th, 2006 at 12:37 PM.
Boooya
Visual Studio 2008 Professional
Don't forget to use [CODE]your code here[/CODE] when posting code
Don't forget to rate helpful posts!
If you're question was answered please mark your thread [Resolved]
Hmmm, I used your example to play around a bit to get what I have now, but it still is not exactly what I am looking for, I am trying to make implementing this into the project a little easier, but I think with this I have actually made it a little more complicated. Here is what I have in my class so far. What I was hoping to acclomplish was to do away with the Datum Structure, however I need it to populate a combobox on the form. Is there a way to populate a combobox with all the items in my enum?
oops, my code is too long so here is an attachment
Boooya
Visual Studio 2008 Professional
Don't forget to use [CODE]your code here[/CODE] when posting code
Don't forget to rate helpful posts!
If you're question was answered please mark your thread [Resolved]