VB ExpressionsConsulting – Computer Systems and Networks
|
|
|
GPS Data Presentation ControlVisual Studio .Net WinForms Custom Control, Copyright © 2007 P. M. Chefalo BackgroundI needed an easy way for users to input GPS data, then to validate and record it, and later, display it again, for one of my .Net WinForms projects. I looked on the Internet for a control that would allow me to do that but was unsuccessful in finding one that did not include additional costly software. While searching, I also found a lot of information on GPS in general, which informed me that GPS data is displayed and stored in several different formats. The most “standard” format, used by many governmental agencies, is NMAE 0183. NMAE 0183 stores the latitude and longitude coordinates as a string, with the general format “dddmm.ffff,h” where d is the degrees, m is the minutes, ffff is decimal minutes (in lieu of seconds) and h is hemisphere. Of course, latitude uses up to two dd places, while longitude takes up to three. (Another popular format is h ddd mm ss.tt, where ss is seconds, and tt is decimal seconds. This is not a standard per se but is often seen.) I decided to create a custom control to facilitate entry and display of GPS data in NMAE format. I am offering it as a trial for other developers to see if it is of value. Note that this “beta” version of the control will expire on April 15, 2007. A licensed copy of the current version can purchased from VB Expressions at any time for $19.95 per design workstation, with free distribution to end users. However, during the “beta” period, I will offer a free license to those who, in the opinion of VB Expressions, offer valuable feedback on the design and usability of the control that leads to greater marketability/acceptance. The control is pretty extensively tested in Visual Studio 2003, and partially tested in VS 2005; only FixedSingle border style was available regardless of control property setting. Rendering the control for VS 2005 required a modification that causes the control to paint slowly on rendering in debug mode, but this effect is not seen in run-time.
Download GPS Data Presentation Control
Shareware
Download GPS Data Presentation Control
Documentation Only
Register GPS Data Presentation Control
Features / Properties Formatter/Parser – Data can be read in natural format and placed into the control. Only numbers can be entered in the degrees, minutes and decimal-minutes fields, and the hemispheres are chosen from a drop-down list. The NMAELatitude and NMAELongitude properties will hold the formatted values if read, or will parse the NMAE format into the display fields if assigned in code. A read-only version of the data with normal degree and minute mark punctuation is available on the ReadableLatitudeString and ReadableLongitudeString properties for display or storage. Data Entry Validation by Restrictions – For most projects, the data to be collected will fall in a limited range of the control’s default range. To promote valid data input the programmer will probably want to limit the range of degrees latitude and longitude available for input. One can set the MinimumDegreesLatitude, MaximumDegreesLatitude, MinimumDegreesLongitude and MaximumDegreesLatitude values to restrict out-of-range data. Likewise, the hemisphere for latitude and longitude can be locked to the programmed value with LatitudeHemisphereLocked and LongitudeHemisphereLocked properties, which will display the DefaultLatitude and DefaultLongitude properties (described below) in a read-only text box. Assign/Read Values – Data can be assigned and read separately for each field from code, using the properties DegreesLatitude, DegreesLongitude, MinutesLatitude, MinutesLongitude, DecimalMinutesLatitude, DecimalMinutesLongitude, DefaultLatitude and DefaultLongitude. The value assignment will obey the range restrictions described above. Also, assignment of degree and minute values (above 90° for latitude, and 180° for longitude; and above 59' for both longitude and latitude, will be set to the top of the permitted values, respectively. Read_Only – The control can be used to display assigned data with a Read-Only property. Appearance – You can change the orientation of the control from stacked vertically (Vertical value) to side-by-side (Horizontal value) using the ControlLayout property. All the elements of the control will be affected by BorderStyle properties, with choices of Fixed3D and FixedSingle, BackColor and ForeColor. The Font property will only change the format of the data fields; use the TitleFont property to change the font for the Latitude and Longitude labels. The control itself is not transparent, but the label elements of the control are transparent so that a background image can be assigned to the control itself. These properties are available at both design and run-time. Use of the ControlTo use this control, you must have the .Net 1.1 runtime installed and Visual Studio, or a development environment that accepts Visual Studio custom controls. Please see the End User License Agreement below to understand your rights and obligations in installing and using this software. To install the product, extract the contents of the downloaded zip file to a known folder location; we recommend "c:\Program Files\VB Expressions" if you have full rights on the workstation, "My Documents\VB Expressions" otherwise. Then to add the control to your Visual Studio Toolbox, open the Windows Forms section of the Toolbox, right click it, and select “Add/Remove Items...” (for VS 2003) or "Choose Items..." (for VS 2005) from the context menu. (Remember that a form MUST be in the selected designer tab for the Toolbox to be activated.) A list box with all the controls available to Visual Studio will appear. Click on the “Browse” button, and then navigate to the location where you unzipped the control, and select the file GPS_Coordinates.dll. When you return to the list box, make sure that the check box next to the entry GPSData is checked, then click “OK.” A new control labeled GPSData will appear in the toolbox. It can then be dragged onto a design surface as needed, just like any other control. To uninstall the product, open the Visual Studio Toolbox with a WinForm in the selected designer tab. Right click the Toolbox, and then select “Add/Remove Items...” (for VS 2003) or "Choose Items..." (for VS 2005) from the context menu. When the controls list box appears, scroll down the alphabetic list until you find the reference to GPSData with the namespace GPS_Coordinates. Uncheck the check box to the left of the control, and then click “OK” on the list box dialog. The control will be removed from the Toolbox. To complete the uninstall process, delete the folder where the GPS_Coordinates.dll file is stored. Potential Future ImprovementsThese may be free updates, or a “Pro” version may be available at additional cost to registered users.
End User License AgreementInstallation of this control in the Visual Studio or Visual Studio compatible environment means that you accept this agreement. The VB Expressions GPS Data Presentation Control is licensed, not sold. Each and every development computer where the control is installed beyond a 30-day trial period is obliged to purchase a license for the software from VB Expressions. Contact service@vbexpressions.com for details. Technical support for this control is limited to the instructions included here. If additional support is needed, please contact service@vbexpressions.com for a service quotation. The control may be distributed as part of a complete software application with no further royalties required. The methods and presentation of this software is a copyrighted product of P. M. Chefalo, dba VB Expressions. This software may not be decompiled or reverse-engineered; all rights are reserved. P. M. Chefalo dba VB Expressions is not responsible for any losses incurred from the use of this product in your development environment or application. The product has been tested and found harmless to the extent possible by its creator, but use at your own risk.
|
Send an email to
webmaster@vbexpressions.com with
questions or comments about this web site.
|