<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Oi preciso mesmo de uma ajudinha (Grande)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">eu não sou programador! dou uns pontapés em VB e python, no entanto nada de especial, dado que muitas vezes perco mto tempo a tentar arranjar soluções.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">e é isso que venho pedir</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial,
 helvetica, sans-serif" size="2">estou com um problema!! estou a tentar uma aplicação simples que seja possivel adicionar ao mapa e à legenda uma layer, que consiga ver a sua tabela de atributos,que consiga alterar a sua visiblidade\invisibilidade e finalmente que possa fazer uma query e/ou calculation +-*/etc com duas ou mais layers.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">na realidade consigo adicionar uma layer ao mapa e à legenda (mas não tenho bem a certeza que estejam interligados). assim que tento utilizar a visibilidade/invisibilidade faz as coisas ao contrário (quando a check box está "check" o layer não se vê no mapa, quando está uncheck o layer ve-ze no mapa)grrrrr.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">e finalmente qnd tiver isto resolvido gostaria de poder criar o tal calculation.</font></div><div><font
 class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Este é o meu codigo:&nbsp;</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">alguem me diga onde está errado e como corrigi-lo (será pelo amarelo...?)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Public Class Form1</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private shapefile As New MapWinGIS.Shapefile</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Grid As New MapWinGIS.Grid</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2">&nbsp; &nbsp; Private GridHeader As New MapWinGIS.GridHeader</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub AxMap1_MouseDownEvent(ByVal sender As System.Object, ByVal e As AxMapWinGIS._DMapEvents_MouseDownEvent) Handles AxMap1.MouseDownEvent</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><span
 class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; font-size: 13px; ">&nbsp;&nbsp;</span><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub btnZoomout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnZoomout.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'Zoom out</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; AxMap1.CursorMode = MapWinGIS.tkCursorMode.cmZoomOut</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub pan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Pan.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'Pan</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; AxMap1.CursorMode = MapWinGIS.tkCursorMode.cmPan</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub btnZoomin_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
 btnZoomin.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'Zoom in</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; AxMap1.CursorMode = MapWinGIS.tkCursorMode.cmZoomIn</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub btnZoomextent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnZoomextent.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'Zoom to full extent</font></div><div><font class="Apple-style-span" face="arial,
 helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; AxMap1.ZoomToMaxExtents()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub OpenfileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenVectorToolStripMenuItem.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim openFD As New OpenFileDialog</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim hndl As Integer</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp;
 'initialize dialog</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; If OpenFileDialogSHP.ShowDialog(Me) = DialogResult.OK Then</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If openFD.CheckFileExists Then</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'open the shapefile</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shapefile.Open(OpenFileDialogSHP.FileName)</font></div><div><font
 class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'add the layer to the map</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMap1.AddLayer(shapefile, True)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If (Not CheckedListBox1.Items.Contains(OpenFileDialogSHP.FileName)) Then</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CheckedListBox1.Items.Add(OpenFileDialogSHP.FileName)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-style-span" style="background-color: rgb(255, 255, 0);">CheckedListBox1.SetItemChecked(hndl, True)</span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; End If</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
 size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub ZoomToLayer()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub btnZoomtolayer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnZoomtolayer.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim hndl As Integer</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'Get handle for
 layer at position 0 in map</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; hndl = AxMap1.get_LayerHandle(0)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'Zoom to the layer at position 0 in the map</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; AxMap1.ZoomToLayer(hndl)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub OpenRasterToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
 OpenRasterToolStripMenuItem.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim grid As New MapWinGIS.Grid()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim openFD As New OpenFileDialog</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim dresult As Windows.Forms.DialogResult</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'Filters allow only shapefiles and raster files to show when Open window appears</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; openFD.Filter = grid.CdlgFilter</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp;
 &nbsp; &nbsp; dresult = openFD.ShowDialog()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'open the dialog</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; If OpenFileDialogGRID.ShowDialog(Me) = DialogResult.OK Then</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'open the grid</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid.Open("")</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Close the grid</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 grid.Close()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; End If</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub btnselect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnselect.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; 'select tool</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; AxMap1.CursorMode =
 MapWinGIS.tkCursorMode.cmSelection</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub btnShowDataGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowDataGrid.Click</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim sfWorld As New MapWinGIS.Shapefile</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim hndsfWorld As Integer = AxMap1.NumLayers - 1 ' this is the handle of the layer you want to work
 with</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; ' get the shapefile object from the layer handle,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; ' it would be better to pass the handle instead of the shapefile</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; sfWorld = AxMap1.get_GetObject(hndsfWorld)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim myTableForm As New Formtable(sfWorld)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; myTableForm.ShowDialog()</font></div><div><font
 class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp;<span class="Apple-style-span" style="background-color: rgb(255, 255, 0);"> Private Sub CheckedListBox1_ItemCheck(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles CheckedListBox1.ItemCheck</span></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2" style="background-color: rgb(255, 255, 0);">&nbsp; &nbsp; &nbsp; &nbsp; Dim hndl As Integer&nbsp;</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2" style="background-color: rgb(255, 255, 0);">&nbsp;
 &nbsp; &nbsp; &nbsp; 'Get the layer handle for the layer at position 0&nbsp;</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2" style="background-color: rgb(255, 255, 0);">&nbsp; &nbsp; &nbsp; &nbsp; hndl = AxMap1.get_LayerHandle(0)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2" style="background-color: rgb(255, 255, 0);">&nbsp; &nbsp; &nbsp; &nbsp; 'Set the specified layer is visible or not based on the state of the Check Box Item&nbsp;</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2" style="background-color: rgb(255, 255, 0);">&nbsp; &nbsp; &nbsp; &nbsp; AxMap1.set_LayerVisible(hndl, CheckedListBox1.GetItemChecked(0))</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2" style="background-color: rgb(255, 255, 0);">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span"
 face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">End Class</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2" style="background-color: rgb(0, 255, 255);">para a janela de atributos é o seguinte:</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Public Class Formtable</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Dim pMyShapeFile As
 New MapWinGIS.Shapefile()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Public Sub New(ByVal myShapeFile As MapWinGIS.Shapefile)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; InitializeComponent()</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; pMyShapeFile = myShapeFile</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; Private Sub FormTable_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim myDataTable As New
 DataTable</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Dim myDataRow As DataRow</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = 0 To pMyShapeFile.NumFields - 1</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myDataTable.Columns.Add(pMyShapeFile.Field(i).Name)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Next i</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; For j As Integer = 0 To pMyShapeFile.NumShapes - 1</font></div><div><font class="Apple-style-span"
 face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myDataRow = myDataTable.NewRow</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For k As Integer = 0 To pMyShapeFile.NumFields - 1</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myDataRow(k) = pMyShapeFile.CellValue(k, j)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next k</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myDataTable.Rows.Add(myDataRow)</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; Next j</font></div><div><font
 class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; &nbsp; &nbsp; DataGridView1.DataSource = myDataTable</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">&nbsp; &nbsp; End Sub</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">End Class</font></div></div></div></body></html>