Nuevas NORMAS para el foro

Curso Hacker
Bienvenido(a), Visitante. Favor de ingresar o registrarse. - Mayo 15, 2008, 10:57:48
Boton Buscar
Inicio Ayuda Calendario Ingresar Registrarse
Visita: Articulos - Juegos Gratis - Da Foros

Comunidad Underground Hispana  |  Programacion  |  Programación  |  Programación Basica  |  Tema: visual basic 6.0 0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: visual basic 6.0  (Leído 400 veces)
jars05
Recien Llegado
*
Desconectado Desconectado

Mensajes: 3


Ver Perfil Email
« en: Julio 31, 2007, 03:53:32 »

Este espacio es para`pomer codigos de programacion de visual basic 6.0 con sql y acces para q todos  lo disfruten y los programadores despejen su duda muy pronto pondremosuna empresa de esta naturaleza osea programacion esto da dinero  Smiley asi que a echarle muchas ganas futuros programadores               muy pronto una empresa de programadores
                                    En El Perù Tongue Tongue Tongue   yo mismo podre algunos pequeños programas y unos pequeños codigos
En línea
jars05
Recien Llegado
*
Desconectado Desconectado

Mensajes: 3


Ver Perfil Email
« Respuesta #1 en: Agosto 01, 2007, 05:01:50 »

hey mano soy yo jars05 hay le mando un codigo para un flexgrid editable
 Option Explicit

Private Sub Form_Load()
Dim r As Integer
Dim c As Integer
Dim max_len As Single
Dim new_len As Single

    ' Use no border.
    Text1.BorderStyle = vbBSNone

    ' Match the grid's font.
    Text1.FontName = MSFlexGrid1.FontName
    Text1.FontSize = MSFlexGrid1.FontSize
    Text1.Visible = False

    ' Create some data.
    MSFlexGrid1.FixedCols = 0
    MSFlexGrid1.Cols = 5
    MSFlexGrid1.FixedRows = 1
    MSFlexGrid1.Rows = 6

    MSFlexGrid1.TextMatrix(0, 0) = "Name"
    MSFlexGrid1.TextMatrix(0, 1) = "Street"
    MSFlexGrid1.TextMatrix(0, 2) = "City"
    MSFlexGrid1.TextMatrix(0, 3) = "State"
    MSFlexGrid1.TextMatrix(0, 4) = "Zip"

    MSFlexGrid1.TextMatrix(1, 0) = "Andy Avaricious"
    MSFlexGrid1.TextMatrix(1, 1) = "827 Problem Blvd"
    MSFlexGrid1.TextMatrix(1, 2) = "Paranoia City"
    MSFlexGrid1.TextMatrix(1, 3) = "CA"
    MSFlexGrid1.TextMatrix(1, 4) = "98765"

    MSFlexGrid1.TextMatrix(2, 0) = "Betty Boisterous"
    MSFlexGrid1.TextMatrix(2, 1) = "4352 Main St Apt 254"
    MSFlexGrid1.TextMatrix(2, 2) = "Langonsville"
    MSFlexGrid1.TextMatrix(2, 3) = "VT"
    MSFlexGrid1.TextMatrix(2, 4) = "01234"

    MSFlexGrid1.TextMatrix(3, 0) = "Charles Cheerful"
    MSFlexGrid1.TextMatrix(3, 1) = "89 North A Ln"
    MSFlexGrid1.TextMatrix(3, 2) = "Codertown"
    MSFlexGrid1.TextMatrix(3, 3) = "MN"
    MSFlexGrid1.TextMatrix(3, 4) = "54583"

    MSFlexGrid1.TextMatrix(4, 0) = "Denise Delightful"
    MSFlexGrid1.TextMatrix(4, 1) = "89 75th"
    MSFlexGrid1.TextMatrix(4, 2) = "Bugvanna"
    MSFlexGrid1.TextMatrix(4, 3) = "WY"
    MSFlexGrid1.TextMatrix(4, 4) = "82738"

    MSFlexGrid1.TextMatrix(5, 0) = "Ed Enlightened"
    MSFlexGrid1.TextMatrix(5, 1) = "2765 N South St E"
    MSFlexGrid1.TextMatrix(5, 2) = "Abend"
    MSFlexGrid1.TextMatrix(5, 3) = "TX"
    MSFlexGrid1.TextMatrix(5, 4) = "67583"

    ' Size the columns.
    Font.Name = MSFlexGrid1.Font.Name
    Font.Size = MSFlexGrid1.Font.Size
    For c = 0 To MSFlexGrid1.Cols - 1
        max_len = 0
        For r = 0 To MSFlexGrid1.Rows - 1
            new_len = TextWidth(MSFlexGrid1.TextMatrix(r, c))
            If max_len < new_len Then max_len = new_len
        Next r
        MSFlexGrid1.ColWidth(c) = max_len + 240
        MSFlexGrid1.ColAlignment(c) = flexAlignLeftCenter
    Next c

    MSFlexGrid1.AllowUserResizing = flexResizeBoth
End Sub
Private Sub GridEdit(KeyAscii As Integer)
    ' Position the TextBox over the cell.
    Text1.Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
    Text1.Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
    Text1.Width = MSFlexGrid1.CellWidth
    Text1.Height = MSFlexGrid1.CellHeight
    Text1.Visible = True
    Text1.SetFocus

    Select Case KeyAscii
        Case 0 To Asc(" ")
            Text1.Text = MSFlexGrid1.Text
            Text1.SelStart = Len(Text1.Text)
        Case Else
            Text1.Text = Chr$(KeyAscii)
            Text1.SelStart = 1
    End Select
End Sub

Private Sub Form_Resize()
    MSFlexGrid1.Move 0, 0, ScaleWidth, ScaleHeight
End Sub


Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
        Case vbKeyEscape
            ' Leave the text unchanged.
            Text1.Visible = False
            MSFlexGrid1.SetFocus

        Case vbKeyReturn
            ' Finish editing.
            MSFlexGrid1.SetFocus

        Case vbKeyDown
            ' Move down 1 row.
            MSFlexGrid1.SetFocus
            DoEvents
            If MSFlexGrid1.Row < MSFlexGrid1.Rows - 1 Then
                MSFlexGrid1.Row = MSFlexGrid1.Row + 1
            End If

        Case vbKeyUp
            ' Move up 1 row.
            MSFlexGrid1.SetFocus
            DoEvents
            If MSFlexGrid1.Row > MSFlexGrid1.FixedRows Then
                MSFlexGrid1.Row = MSFlexGrid1.Row - 1
            End If

    End Select
End Sub
' Do not beep on Return or Escape.
Private Sub Text1_KeyPress(KeyAscii As Integer)
    If (KeyAscii = vbKeyReturn) Or _
       (KeyAscii = vbKeyEscape) _
            Then KeyAscii = 0
End Sub
Private Sub MSFlexGrid1_DblClick()
    GridEdit Asc(" ")
End Sub

Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
    GridEdit KeyAscii
End Sub

Private Sub MSFlexGrid1_LeaveCell()
    If Text1.Visible Then
        MSFlexGrid1.Text = Text1.Text
        Text1.Visible = False
    End If
End Sub
Private Sub MSFlexGrid1_GotFocus()
    If Text1.Visible Then
        MSFlexGrid1.Text = Text1.Text
        Text1.Visible = False
    End If
End Sub
En línea
Páginas: [1] Ir Arriba Imprimir 
Comunidad Underground Hispana  |  Programacion  |  Programación  |  Programación Basica  |  Tema: visual basic 6.0 « anterior próximo »
Ir a:  
Novedades, Dudas, Comentarios Y Sugerencias, Top 100, Off-Topic, Revista E-Zine, Revista E-Zine, Sistemas operativos libres. , HacK GeneraL, Phreaking, Bug y Exploits, Networking & Wireless, Overclocking, Refrigeracion y demas, Hardware, Electronica Y Robotica, Hack para newbies, Todo Messenger, Troyanos y virus, Programacion, Programacion para webmasters, Software, Cracks & Serialz, P2p, Bittorrent, Elinks, Diseño Grafico, Juegos PC, Mp3, Multimedia, Peliculas Divx, Juegos, Humor y Adultos. (Diversion), Paginas Webs Recomendadas, Videos,


Zona-Musical Juegos online Juego Gratis10 Solucion Hosting Videos De Musica 1juegogratis Dragonjar
Noticias
 Juegos De Coche juegos gratis online juegos Los Foros De Sexe Gratuit Sexo Duro Tierra Messenger Trucos
Ranking-Hits
Powered by SMF 1.1.5 | SMF © 2006-2007, Simple Machines LLC