viernes, 25 de febrero de 2011

CREACION DE SETUP EN BISUAL BASIC

PARA DESCARGAR EL EJEMPLO DE CREACION DE SETUP EN BISUAL BASIC 2008 COPIAR EL SIGUIENTE EN LACE

descargar manual de instalacion

DATOS DE UN GRID A OTRO DATA GRID EN BISUAL VASIC


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDonar.Click

' muostrar el total de la suma en el control Label para la columna llamada Costo
Pago.Text = " " & Format(Sumar("total", datagridcompras), ).ToString

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAgregar.Click
'determinar la direccion de copiar entre DGV1 y 2
If CheckBox1.Checked Then

'Comprobar que existen columnas seleccionadas
If datagridproducto.SelectedRows.Count > 0 Then
CopiarSeleccionadosDGV1aDGV2()
End If
Else
If datagridcompras.SelectedRows.Count > 0 Then
CopiarSeleccionadosDGV2aDGV1()
End If
End If
End Sub
'Copiar los elementos seleccionados del DGV1 al DGV2
Sub CopiarSeleccionadosDGV1aDGV2()
For Each Seleccion As DataGridViewRow In datagridproducto.SelectedRows
Me.datagridcompras.Rows.Add(ObtenerValoresFila(Seleccion))
Next
datagridproducto.ClearSelection()
End Sub
'
'Copiar los elementos seleccionados del DGV1 al DGV2
Sub CopiarSeleccionadosDGV2aDGV1()
For Each Seleccion As DataGridViewRow In datagridcompras.SelectedRows
'Me.CurrentAutoScaleDimensions.Tables(0).Rows.Add(ObtenerValoresFila(Seleccion))
Next
datagridcompras.ClearSelection()
End Sub
'
'Mover los elementos seleccionados del DGV1 al DGV2
Sub MoverSeleccionadosDGV1aDGV2()
'Para cada fila seleccionada
For Each Seleccion As DataGridViewRow In datagridproducto.SelectedRows
'Añadir los valores obtenidos de la fila seleccionada
'al segundo datagridview
Me.datagridcompras.Rows.Add(ObtenerValoresFila(Seleccion))
'eliminar la fila del DataGridView origen
datagridproducto.Rows.Remove(Seleccion)
Next
End Sub
'
'Mover los elementos seleccionados del DGV1 al DGV2
Sub MoverSeleccionadosDGV2aDGV1()
'Para cada fila seleccionada
For Each Seleccion As DataGridViewRow In datagridcompras.SelectedRows
'Añadir los valores obtenidos de la fila seleccionada
'al segundo datagridview
'Me.MiDataSet.Tables(0).Rows.Add(ObtenerValoresFila(Seleccion))
'eliminar la fila del DataGridView origen

datagridcompras.Rows.Remove(Seleccion)
Next
End Sub


Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnElimina.Click
'determinar la direccion de mover entre DGV1 y 2
If CheckBox1.Checked Then
'Comprobar que existen columnas seleccionadas
If datagridproducto.SelectedRows.Count > 0 Then
MoverSeleccionadosDGV1aDGV2()
End If
Else
If datagridcompras.SelectedRows.Count > 0 Then
MoverSeleccionadosDGV2aDGV1()
End If
End If
End Sub
'

'
'Obtener el contenido de la fila en un string()
'con el proposito de copiarlo o moverlo
'
'Recibe el 'row' y retorna su contenido en un array tipo string
Function ObtenerValoresFila(ByVal fila As DataGridViewRow) As String()
'Dimensionar el array al tamaño de columnas del DGV
Dim Contenido(Me.datagridproducto.ColumnCount - 1) As String
'Rellenar el contenido con el valor de las celdas de la fila
Dim Ndx As Integer
For Ndx = 0 To Contenido.Length - 1
Contenido(Ndx) = fila.Cells(Ndx).Value
Next
Return Contenido
End Function

DIRECCION MAC

PARA PODER VERIFICAR LA DIRECION MAC DE MI PC SOLO REALIZO LO SIGUENTE:

Si estas en windows:

clic con el raton en Inicio\ejecutar
escribe cmd y pulsa enter

te saldra una ventana negra

escribe:
ipconfig /all


y ahi donde pone direccion fisica te apareceran seis pares de hexadecimales, tipo 0A-FB-98-AD-23-11 por ejemplo.

Eso es tu direccion MAC.

JEILBREAK A MI IPAD DE 32 GB

El jailbreak para el iPad es toda una realidad con la salida de Spirit, herramienta disponible para Windows y Mac que nos permite hacer el jailbreak al iPad, iPhone y iPod Touch. Usar Spirit es cosa de bebes, solo hay que conectar el iPad al ordenador, dar clic en un boton y el resto es magia. Veamos el siguiente tutorial para ver como se realiza el proceso.

1. Descarga iTunes 9.1.1

2. Descarga Spirit

3. Ejecuta Spirit y da clic en el boton Jailbreak



Luego de unos cuantos segundos la aplicacion lanzara el mensaje “Jailbreak Complete”, el cual indicara que el proceso ha terminado correctamente.








Despues el iPad se reiniciara automaticamente y listo, debe estar presente el icono de Cydia en el Springboard.

listo.---------------------




 

programando en bisual basic 2008 conexion a microsoft acces 2007

este codigo ba en el boton de busqueda para realizar la busqueda aca les dejo el ejemplo si fucion y se a implementado en el proyecto sytema para el control y manejo de inventario
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub btnBuscar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBuscar.Click

If (TxtClaveProducto.TextLength <= 0 And txtNombreProducto.TextLength > 0) Then
Dim con As DB.CConnectSQL = New DB.CConnectSQL
con.fnOpenConnection(CContext.vDB)
Dim query As String = "Select * from productos where nombre_producto='" & txtNombreProducto.Text & "'"
Dim regs As DataTable
regs = con.fnGetData(query, CContext.vDB)
con.fnCloseConnection()
datagridproducto.DataSource = regs
Else
If (TxtClaveProducto.TextLength > 0 And txtNombreProducto.TextLength <= 0) Then
Dim con As New DB.CConnectSQL
con.fnOpenConnection(CContext.vDB)
Dim query As String = "Select * from productos where cve_producto='" & TxtClaveProducto.Text & "'"
Dim regs As DataTable
regs = con.fnGetData(query, CContext.vDB)
con.fnCloseConnection()
datagridproducto.DataSource = regs
Else
Try
Dim con As DB.CConnectSQL = New DB.CConnectSQL
con.fnOpenConnection(CContext.vDB)
Dim query As String = "Select * from productos"
Dim regs As DataTable
regs = con.fnGetData(query, CContext.vDB)
con.fnCloseConnection()
Me.datagridproducto.DataSource = regs
Catch ex As Exception
MsgBox("Ocurrio un error al leer los datos de la base de datos")
End Try

End If

End If
End Sub