
Generador y lector de códigos QR
Visual Basic.NET
Publicado el 15 de Octubre del 2013 por Administrador (718 códigos)
31.871 visualizaciones desde el 15 de Octubre del 2013
Excelente aplicación para leer y crear códigos QR, con diferentes plantillas, ya sea para SMS, Url's, contacto, direcciones de correo, eventos, geolocalización,...
Permite especificar el nivel de corrección, la escala y los colores.
Desarrollado en Visual Basic .NET 2010
Permite especificar el nivel de corrección, la escala y los colores.
Desarrollado en Visual Basic .NET 2010
Comentarios sobre la versión: Versión 1 (9)
Suerte.
Tengo el siguiente problema, mediante codigo tengo una conexion a una base de datos en access y cuando creo un nuevo registros desde visual Basic (Visual Studio 2019) me dice que el registro se guardo pero cuando salgo del formulario invocando el envento FormClosing me da un error.
Estoy usando tambien parte del codigo publicado aqui en la web para generar un codigo QR con la informacion. Forma parte de AjpdSoft.
En la salida me dice que el programa termino codigo 0 (0x0) y me dice que se produjo una Excepción:
Excepción producida: 'System.Data.OleDb.OleDbException' en System.Data.dll
El subproceso 0xf038 terminó con código 0 (0x0).
El subproceso 0x11044 terminó con código 0 (0x0).
El programa '[68032] CodeQRme2.exe' terminó con código 0 (0x0).
Les dejo codigo a ver si me dan una mano:
Private Sub formLesenGenerierenCodeQR_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If MyState = "Edit" Or MyState = "Add" Then
MessageBox.Show("You must finish the current edit before stopping the application.", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
e.Cancel = True
Else
Try
'save the updated Projekt table
Dim ProjektAdapterCommands As New OleDbCommandBuilder(ProjektAdapter)
ProjektAdapter.Update(ProjektTable)
Catch ex As Exception
MessageBox.Show("Error saving database to file:" + ControlChars.CrLf + ex.Message, "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
'close the connection
ProjektConnection.Close()
'dispose of the objects
ProjektConnection.Dispose()
ProjektCommand.Dispose()
ProjektAdapter.Dispose()
ProjektTable.Dispose()
End If
End Sub
______________________________________________________________________________________
Private Sub btnDone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDone.Click
Me.Close()
End Sub
______________________________________________________________________________________
Private Sub formLeerGenerarCodigosQR_Load(sender As System.Object,
e As System.EventArgs) Handles MyBase.Load
lsNivelCorreccion.SelectedIndex = 1
txtEscalaPixel.Text = 4
'connect to Phone database
ProjektConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source = c:\VBDB\Working\Projektme2.accdb;Persist Security Info = False; ;")
ProjektConnection.Open()
'establish command object
ProjektCommand = New OleDbCommand("Select * from Projekt", ProjektConnection)
'establish data adapter/data table
ProjektAdapter = New OleDbDataAdapter()
ProjektAdapter.SelectCommand = ProjektCommand
ProjektTable = New DataTable()
ProjektAdapter.Fill(ProjektTable)
'bind controls to data table
txtIDProjekt.DataBindings.Add("Text", ProjektTable, "IDProjekt")
txtCustomer.DataBindings.Add("Text", ProjektTable, "Customer")
txtModule.DataBindings.Add("Text", ProjektTable, "Module")
txtProjekt.DataBindings.Add("Text", ProjektTable, "ProjektName")
txtSerial.DataBindings.Add("Text", ProjektTable, "SerialNo")
txtOrderType.DataBindings.Add("Text", ProjektTable, "OrderType")
txtDatum.DataBindings.Add("Text", ProjektTable, "DatumPro")
txtTotalUhr.DataBindings.Add("Text", ProjektTable, "TotalUhr")
'establish currency manager
ProjektManager = DirectCast(Me.BindingContext(ProjektTable), CurrencyManager)
pColorFondo.BackColor = Color.FromArgb(colorFondoQR)
pColorQR.BackColor = Color.FromArgb(colorQR)
tabFormatoQR.SelectedTab = TabProjekt
Call SetState("View")
txtProjekt_TextChanged(sender, e)
End Sub