elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Aplicacion para crear un teclado de celular: Alfanumerico.
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Aplicacion para crear un teclado de celular: Alfanumerico.  (Leído 2,805 veces)
FelixJMaxwell

Desconectado Desconectado

Mensajes: 5


Ver Perfil
Aplicacion para crear un teclado de celular: Alfanumerico.
« en: 24 Febrero 2013, 21:39 pm »

Buenas vagando mucho por internet y no encontrar nada al respecto me gustaria ponerlo aqui,
es una aplicacion para crear un celular con teclado alfanumerico en visual basic
esta incompleto me gustaria hacer unas preguntas para poder completarla o que alguien me heche una mano, esta la mayoria del codigo ya hecho solo hacen falta pequeños detalles para que parezca un teclado de celular funcional de tipo Alfanumerico (2 abc, 3 def, etc...)

pongo el codigo que da visual basic para crear la interfase tambien adjunto una imagen antes del codigo:



Código
  1. Public Class Form1
  2.    Dim nombreB As String = ""
  3.    Public Sub ControlSetFocus(ByVal control As Control)
  4.        ' Set focus to the control, if it can receive focus.
  5.        If control.CanFocus Then
  6.            control.Focus()
  7.        End If
  8.    End Sub
  9.  
  10.    Private Sub btnBorrar(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
  11.        Dim resultado
  12.        Dim borrar = txtPantalla.Text.Length - 1
  13.        resultado = txtPantalla.Text.Substring(0, borrar)
  14.        txtPantalla.Text = resultado
  15.  
  16.        txtPantalla.Focus()
  17.        Dim Posicion = txtPantalla.Text.Length
  18.        txtPantalla.SelectionStart = Posicion
  19.    End Sub
  20.  
  21.    Private Sub btnDos_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  22.  
  23.        Dim Cars() As String = {"a", "b", "c", "2"}
  24.        Static I As Integer = 0
  25.        Dim ObjButton As Button = CType(sender, Button)
  26.        If I >= Cars.Length Then
  27.            I = 0
  28.        End If
  29.        If nombreB <> ObjButton.Text Then
  30.            I = 0
  31.            nombreB = ObjButton.Text
  32.        Else
  33.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  34.        End If
  35.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  36.        I = I + 1
  37.  
  38.        'Funcion MID
  39.        'If txtPantalla.Text Then
  40.        'txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  41.        'End If
  42.  
  43.  
  44.        Dim Posicion = txtPantalla.Text.Length
  45.        txtPantalla.Focus()
  46.        txtPantalla.SelectionStart = Posicion
  47.    End Sub
  48.  
  49.  
  50.    Private Sub btnTres_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  51.        Dim Cars() As String = {"d", "e", "f", "3"}
  52.        Static I As Integer = 0
  53.        Dim ObjButton As Button = CType(sender, Button)
  54.        If I >= Cars.Length Then
  55.            I = 0
  56.        End If
  57.        If nombreB <> ObjButton.Text Then
  58.            I = 0
  59.            nombreB = ObjButton.Text
  60.        Else
  61.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  62.        End If
  63.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  64.        I = I + 1
  65.  
  66.        txtPantalla.Focus()
  67.        Dim Posicion = txtPantalla.Text.Length
  68.        txtPantalla.SelectionStart = Posicion
  69.    End Sub
  70.  
  71.    Private Sub btnCuatro_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
  72.        Dim Cars() As String = {"g", "h", "i", "4"}
  73.        Static I As Integer = 0
  74.        Dim ObjButton As Button = CType(sender, Button)
  75.        If I >= Cars.Length Then
  76.            I = 0
  77.        End If
  78.        If nombreB <> ObjButton.Text Then
  79.            I = 0
  80.            nombreB = ObjButton.Text
  81.        Else
  82.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  83.        End If
  84.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  85.        I = I + 1
  86.  
  87.        txtPantalla.Focus()
  88.        Dim Posicion = txtPantalla.Text.Length
  89.        txtPantalla.SelectionStart = Posicion
  90.    End Sub
  91.  
  92.    Private Sub btnCinco_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
  93.        Dim Cars() As String = {"j", "k", "l", "5"}
  94.        Static I As Integer = 0
  95.        Dim ObjButton As Button = CType(sender, Button)
  96.        If I >= Cars.Length Then
  97.            I = 0
  98.        End If
  99.        If nombreB <> ObjButton.Text Then
  100.            I = 0
  101.            nombreB = ObjButton.Text
  102.        Else
  103.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  104.        End If
  105.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  106.        I = I + 1
  107.  
  108.        txtPantalla.Focus()
  109.        Dim Posicion = txtPantalla.Text.Length
  110.        txtPantalla.SelectionStart = Posicion
  111.    End Sub
  112.  
  113.    Private Sub btnSeis_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
  114.        Dim Cars() As String = {"m", "n", "o", "6"}
  115.        Static I As Integer = 0
  116.        Dim ObjButton As Button = CType(sender, Button)
  117.        If I >= Cars.Length Then
  118.            I = 0
  119.        End If
  120.        If nombreB <> ObjButton.Text Then
  121.            I = 0
  122.            nombreB = ObjButton.Text
  123.        Else
  124.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  125.        End If
  126.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  127.        I = I + 1
  128.  
  129.        txtPantalla.Focus()
  130.        Dim Posicion = txtPantalla.Text.Length
  131.        txtPantalla.SelectionStart = Posicion
  132.    End Sub
  133.  
  134.    Private Sub btnSiete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
  135.        Dim Cars() As String = {"p", "q", "r", "s", "7"}
  136.        Static I As Integer = 0
  137.        Dim ObjButton As Button = CType(sender, Button)
  138.        If I >= Cars.Length Then
  139.            I = 0
  140.        End If
  141.        If nombreB <> ObjButton.Text Then
  142.            I = 0
  143.            nombreB = ObjButton.Text
  144.        Else
  145.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  146.        End If
  147.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  148.        I = I + 1
  149.  
  150.        txtPantalla.Focus()
  151.        Dim Posicion = txtPantalla.Text.Length
  152.        txtPantalla.SelectionStart = Posicion
  153.    End Sub
  154.  
  155.    Private Sub btnOcho_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
  156.        Dim Cars() As String = {"t", "u", "v", "8"}
  157.        Static I As Integer = 0
  158.        Dim ObjButton As Button = CType(sender, Button)
  159.        If I >= Cars.Length Then
  160.            I = 0
  161.        End If
  162.        If nombreB <> ObjButton.Text Then
  163.            I = 0
  164.            nombreB = ObjButton.Text
  165.        Else
  166.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  167.        End If
  168.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  169.        I = I + 1
  170.  
  171.        txtPantalla.Focus()
  172.        Dim Posicion = txtPantalla.Text.Length
  173.        txtPantalla.SelectionStart = Posicion
  174.    End Sub
  175.  
  176.    Private Sub btnNueve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
  177.        Dim Cars() As String = {"w", "x", "y", "z", "9"}
  178.        Static I As Integer = 0
  179.        Dim ObjButton As Button = CType(sender, Button)
  180.        If I >= Cars.Length Then
  181.            I = 0
  182.        End If
  183.        If nombreB <> ObjButton.Text Then
  184.            I = 0
  185.            nombreB = ObjButton.Text
  186.        Else
  187.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
  188.        End If
  189.        txtPantalla.Text = txtPantalla.Text & Cars(I)
  190.        I = I + 1
  191.  
  192.        txtPantalla.Focus()
  193.        Dim Posicion = txtPantalla.Text.Length
  194.        txtPantalla.SelectionStart = Posicion
  195.    End Sub
  196.  
  197. End Class
  198.  
  199.  

Considero que se le deben agregar mas botones para el correcto parecido a un teclado de Celular

Cosas faltantes:
Citar
Al momento de presionar el mismo boton por ejemplo:
Se presiona "2 abc" en pantalla aparece: abc2abc2 en lugar de cambiar la primera a por una b
para que en pantalla solo salga: "b" al presionar por segunda vez el boton "2 abc"
Citar
Falta poder hacer un cambio entre minusculas y mayusculas asi como agregar los caracteres del boton 1 que son en la mayoria de celulares estos: " . , / ? ! - : ' " 1 "
Citar
Falta agregar un timer para que pasados 3 segundos el puntero avance automaticamente en caso de querer escribir una misma tecla en un espacio aparte

si alguien quiere aportar algo sientase libre de hacerlo y si se debe hacer algun cambio en alguna parte que tambien lo diga y modificare el post principal.

Saludos.


« Última modificación: 25 Febrero 2013, 00:29 am por FelixJMaxwell » En línea

FelixJMaxwell

Desconectado Desconectado

Mensajes: 5


Ver Perfil
Re: Aplicacion para crear un teclado de celular: Alfanumerico.
« Respuesta #1 en: 24 Febrero 2013, 22:04 pm »

- Post Apartado para anotar actualizaciones del post principal -

- Agregado codigo:
Código
  1. Else
  2.            txtPantalla.Text = Mid(txtPantalla.Text, 1, Len(txtPantalla.Text) - 1)
que permite presionar dos veces una misma tecla y que cambie de "a" a "b" sin mostrar dos letras en la textbox "ab"


« Última modificación: 25 Febrero 2013, 00:24 am por FelixJMaxwell » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Crear infrarrojo para Celular/Laptops
Electrónica
‭‭‭‭jackl007 0 15,212 Último mensaje 2 Noviembre 2007, 20:27 pm
por ‭‭‭‭jackl007
Crear una aplicación para celular
Java
danielo- 6 27,246 Último mensaje 11 Abril 2010, 17:26 pm
por danielo-
Como crear hash alfanumérico autoincrementado en php y mysql?
PHP
WHK 3 7,259 Último mensaje 17 Octubre 2010, 16:18 pm
por Og.
Crear un autorun para aplicacion no-extraible « 1 2 »
Hacking
rulovive 15 10,261 Último mensaje 19 Febrero 2011, 03:04 am
por Noises
¿se puede crear aplicacion para celular, JAR (un libro) con tipografia japoneSA
Programación General
dani150 0 1,589 Último mensaje 4 Septiembre 2013, 03:04 am
por dani150
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines