Formularios Polygon Personalizados
Por Ciberwalter
Fecha: 19 Septiembre 2003 (publicado el
26/Oct/2003, actualizado 07/Dic/2003)
Autor: by Ciberwalter - waltermilenium@hotmail.com
NOTA del 07/Dic/2003:
Esta es la colaboración originalmente recibida y publicada.
Pero deberías ver las "actualizaciones" que Ciberwalter ha enviado, en la que además se incluye un pequeño tutorial y el código.
Aquí tienes el link a las dos nuevas páginas sobre este mismo tema:
---xxx---
Bueno, este pequeño aporte al mundo programador realiza un Area Map Shape para páginas web, al igual que lo hace el dreamweaver, salvo un pequeño código de más que permite realizar los mismos Area Shape pero en tus formularios Visual Basic, Que Tal, tus formularios ahora cobrarán vida, pero mejor bajen el código explicativo y lean las instrucciones, Okey, y visiten mi Website www.geocities.com/gnivel4.
Este es el código para Visual Basic (6.0):
Dim Raya As String
Dim SePuede As String
Dim i, ter
Private Sub DelImg_Click()
Form1.Picture = Image1.Picture
End Sub
Private Sub Form_DblClick()
If SePuede = "True" Then
List1.AddItem (Text4)
List1.AddItem (Text3)
List1.AddItem (List1.List(0))
List1.AddItem (List1.List(1))
Line (List1.List(0), List1.List(1))-(Text4, Text3)
Raya = "Nada"
Generar.Enabled = True
End If
End Sub
Private Sub Form_Load()
Raya = "True"
i = -1
Form1.Picture = LoadPicture(App.Path & "\Imagen.jpg")
Text7 = App.Path & "\Imagen.jpg"
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Raya = "Nada" Then
MsgBox "Para realizar otra selección, debes seleccionar ''Nueva Area''", 0, "No se Puede"
End If
If Raya = "False" Then
Text3 = Y
Text4 = X
Line (Text2, Text1)-(Text4, Text3)
List1.AddItem (Text2)
List1.AddItem (Text1)
Text1 = Text3
Text2 = Text4
SePuede = "True"
End If
If Raya = "True" Then
Text1 = Y
Text2 = X
Raya = "False"
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub Generar_Click()
Timer2.Enabled = True
SePuede = "False"
Form2.Visible = True
End Sub
Private Sub mClose_Click()
End
End Sub
Private Sub mHelp_Click()
MsgBox "Map Polygon fue Escrito Por Ciberwalter, Para cualquier felicitación, alago o cualquier gesto de aprecio escriban a mi mail waltermilenium@hotmail.com, o visiten my website www.geocities.com/gnivel4", 0, "Acerca de Ciberwalter" End Sub
Private Sub Mostrar_Click()
Frame1.Visible = True
Ocultar.Enabled = True
Mostrar.Enabled = False
End Sub
Private Sub Ocultar_Click()
Frame1.Visible = False
Ocultar.Enabled = False
Mostrar.Enabled = True
End Sub
Private Sub Otra_Click()
Refresh
Timer2.Enabled = False
Text.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Area.Text = ""
coord.Text = ""
List1.Clear
Generar.Enabled = False
Raya = "True"
i = -1
SePuede = "True"
End Sub
Private Sub Timer1_Timer()
Text5 = List1.ListCount
End Sub
Private Sub Timer2_Timer()
Do While i < List1.ListCount
i = i + 1
ter = List1.List(i)
Text = Text & "," & ter
Loop
If Text = "" Then
Else
Dim coma1, coma2
coma1 = InStr(Text, ",")
coma2 = InStrRev(Text, ",")
coord = Mid$(Text, coma1 + 1, coma2 - 2)
Area = "" Form2.Resultado = "" & Chr(13) + Chr(10) & ""
End If
End Sub
Si no les resulta mejor bajense los ejemplillos.
Para Hacer Forms con formas Divertidas (Form Forma 4 VB6.zip - 69,2 KB)
Para Hacer Areas Polygon en paginas HTM (Area Shape Map VB6.0.zip - 81,5 KB)
Utilidad para hacer Forms con Forma (Más Facil que nunca)(Create Polygon Form VB6.zip - 44,2 KB)
Nota del Guille:
Debido a que algunos de los ficheros contenidos en los zips de ejemplos son ejecutables (exe) y no incluyen el código fuente, si queréis obtenerlos, poneros en contacto con el autor del artículo.
Perdonad los inconvenientes.