![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
||||
|
||||
Como Crear Etiquetas Con Mapobjects Y Vb.net 2008
Hola a todos, pues soy nuevo en este foro , pero quisiera saber como poner etiquetas a una capa .shapefile con un botón y un cuadro de dialogo fontdialog,por favor ayudadme... de antemano muchas gracias.
Última edición por euler21bv fecha: 15-09-2012 a las 01:04:24. |
#2
|
||||
|
||||
Cita:
bueno aca les dejo todo el codigo,es lo que hasta ahora tengo,pero por favor alguien que me ayude a completarlo segun mi solicitud anterior...muchas gracias... Imports System.Runtime.InteropServices Imports ESRI.MapObjects2.Core Public Class Form1 Dim mp_layer As MapLayer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnabrir.Click OFd_shp.Filter = "Mis Archivos shp|*.shp|archivosdbf|*.dbf" OFd_shp.ShowDialog() Dim archivo As String archivo = OFd_shp.FileName If archivo <> "" Then Dim pos As Integer = archivo.LastIndexOf("\") INICIAMAPA(archivo.Substring(0, pos), archivo.Substring(pos + 1)) vistacompleta() End If End Sub Private Sub INICIAMAPA(ByVal datapath As String, ByVal file As String) Try Dim dc As DataConnection = New DataConnectionClass Dim path As String = datapath dc.Database = path dc.Connect() mp_layer = New MapLayerClass Dim gds As GeoDataset = dc.FindGeoDataset(file) mp_layer.GeoDataset = gds AxMap1.Layers.Add(mp_layer) AxMap2.Layers.Add(mp_layer) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Private Sub vistacompleta() AxMap1.Extent = AxMap1.FullExtent AxMap2.Extent = AxMap1.FullExtent End Sub Private Sub AxMap1_KeyDownEvent(ByVal sender As Object, ByVal e As ESRI.MapObjects2.Core.KeyDownEventArgs) Handles AxMap1.KeyDownEvent Try If e.keyCode = 123 Then vistacompleta() End If Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Private Sub zoom_move(ByVal sender As System.Object, ByVal e As ESRI.MapObjects2.Core.MouseDownEventArgs) Handles AxMap1.MouseDownEvent 'evento que permite maximizar al hacer clic Try Dim Rect As Rectangle If e.button = 1 Then System.Windows.Forms.Cursor.Current = Cursors.SizeAll 'cursor cuatro flechas Rect = AxMap1.TrackRectangle If Not Rect Is Nothing Then AxMap1.Extent = Rect End If Else System.Windows.Forms.Cursor.Current = Cursors.Hand AxMap1.Pan() End If Catch ex As Exception Finally System.Windows.Forms.Cursor.Current = Cursors.Default End Try End Sub Private Sub Etiquetas(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_label.Click Try Dim pfont As New stdole.StdFont '1) With pfont .Name = "times" .Bold = False .Italic = False .Underline = True .Size = 12 '_______________________________>las propiedades son de tipo estatico End With Dim plabel As New LabelRenderer With plabel '9) .Symbol(0).Height = tkb_etiquetas.Value .Symbol(0).Font = pfont .Field = "NOMBDEP" .AllowDuplicates = True End With mp_layer.Renderer = plabel AxMap1.CtlRefresh() Catch ex As Exception End Try End Sub Private Sub tkb_etiquetas_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tkb_etiquetas.Scroll Etiquetas(sender, e) End Sub Private Sub btntipoletra_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntipoletra.Click FD_tipoletra.ShowDialog() End Sub End Class donde dice que las propiedades son de tipo estático, pues lo que quiero es independizar esas propiedades..gracias. |
#3
|
||||
|
||||
Bienvenido a clubdelphi, ¿ya leiste nuestra guía de estilo?, gracias por tu colaboración
![]() Recuerda poner los tags al código fuente, ejemplo: ![]() Gracias ![]()
__________________
La otra guía de estilo | Búsquedas avanzadas | Etiquetas para código | Colabora mediante Paypal |
![]() |
|
|
![]() |
||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Crear un Triger para Generar Número de Serie en MS Sql Server Express 2008 | hondaalberto | MS SQL Server | 8 | 15-08-2012 16:44:01 |
crear tablas en SQL express, utilizando VB.Net 2008 | flashtkd | .NET | 0 | 21-08-2008 18:56:59 |
Como crear etiquetas de code | fide | PHP | 1 | 31-01-2008 00:17:10 |
Como utilizar MapObjects y Oracle | Calvsoft | Oracle | 1 | 06-09-2006 22:56:14 |
MapObjects & Delphi | TriLoCBA | Gráficos | 6 | 03-08-2005 00:32:54 |
![]() |
|