Códigos Fuente de Visual Basic

Mostrando del 1 al 10 de 761 registros
<<>>
Imágen de perfil
Val: 1.019
Bronce
Ha mantenido su posición en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

Cx_Contabilidad Financiera


Visual Basic

estrellaestrellaestrellaestrellaestrella(9)
Actualizado el 14 de Enero del 2025 por Rafael (25 códigos) (Publicado el 21 de Diciembre del 2022)
41.700 visualizaciones desde el 21 de Diciembre del 2022
Cx es un programa para Windows.
Sirve para gestionar la contabilidad.
Produce: libro diario, auxiliar,
balanzas, recapitulación, estados financieros,
balance general, estado de pérdidas y ganancias,
estado de resultados y estados de cuentas.
Servosistema que administra
la oficina sin papeles.
Multiusuario cliente/servidor, red inalámbrica.
Código abierto. Trabajo a distancia.
Adjunto Cx Guía del rey de la creación

Sin-titulo
sin imagen de perfil

bloqueos


Visual Basic

estrellaestrellaestrellaestrellaestrella(1)
Publicado el 13 de Diciembre del 2024 por Elizabeth
359 visualizaciones desde el 13 de Diciembre del 2024
Public Class Form4
Dim T, Ru, A0, B0, a, b, c, V, M, vem, vem2, R1, R2, R3, R4, R5, R6, R7, R8, Var As Double


Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox1.Text = ""
TextBox2.Text = ""
Label5.Text = ""
ComboBox2.Text = "m3/kg"
ComboBox3.Text = "K"
ComboBox4.Text = "Kpa"

End Sub

Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox4.SelectedIndexChanged
ComboBox4.DropDownStyle = ComboBoxStyle.DropDownList
If ComboBox4.Text = "Kpa" Then
Label5.Text = R7
Label5.Text = Math.Round(Convert.ToDouble(R7), 4)
ElseIf ComboBox4.Text = "Pascal" Then
Label5.Text = R7 * 1000
Label5.Text = Math.Round(Convert.ToDouble(R7 * 1000), 4)
ElseIf ComboBox4.Text = "Atmosfera" Then
Label5.Text = R7 / 101.3
Label5.Text = Math.Round(Convert.ToDouble(R7 / 101.3), 4)
ElseIf ComboBox4.Text = "Bar" Then
Label5.Text = R7 / 100
Label5.Text = Math.Round(Convert.ToDouble(R7 / 100), 4)
ElseIf ComboBox4.Text = "Psi" Then
Label5.Text = R7 / 6.895
Label5.Text = Math.Round(Convert.ToDouble(R7 / 6.895), 4)
End If
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
Label5.Text = ""
ComboBox2.Text = "m3/kg"
ComboBox3.Text = "K"
ComboBox4.Text = "Kpa"
Label5.Text = ""
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
If ComboBox1.Text = "Nitrógeno" Then
A0 = 136.2315
B0 = 0.05046
a = 0.02617
b = -0.00691
c = 42000
M = 28.013
Ru = 8.314

ElseIf ComboBox1.Text = "Hidrógeno" Then
A0 = 20.0117
B0 = 0.02096
a = -0.00506
b = -0.04359
c = 504
M = 2.015
Ru = 8.314

ElseIf ComboBox1.Text = "Argón" Then
A0 = 130.7802
B0 = 0.03931
a = 0.02328
b = 0.0
c = 59900
M = 39.984
Ru = 8.314
End If
End Sub
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
If ComboBox2.Text = "m3/kg" Then
V = Val(TextBox1.Text)
ElseIf ComboBox2.Text = "cm3/g" Then
V = Val(TextBox1.Text) * 1000
ElseIf ComboBox2.Text = "ft3/lb" Then
V = Val(TextBox1.Text) * 16.01846337
ElseIf ComboBox2.Text = "in3/Oz" Then
V = Val(TextBox1.Text) * 1729.994044
End If
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Var = False
If ComboBox1.Text = "" Then
MessageBox.Show("Escoge el gas")
Var = True
ElseIf TextBox1.Text = "" Then
MessageBox.Show("Introduce el volumen")
Var = True

ElseIf TextBox1.Text <= 0 Then
Label5.Text = ""
MsgBox("Error, Proporciona un volumen mas alto")
Var = True
'Label5.Visible = False
ElseIf TextBox2.Text = "" Then
MessageBox.Show("Introduce la tempertura")
Var = True
ElseIf TextBox1.Text = "" Then
MessageBox.Show("Introduce el volumen")
Var = True
End If
If Var = False Then

If ComboBox3.Text = "K" Then
Label5.Text = ""
If TextBox2.Text < 60 Or TextBox2.Text > 300 Then
MessageBox.Show("error el rango de la T debe ser >60 y <300 K")
Var = True
Else
T = Val(TextBox2.Text)
End If
ElseIf ComboBox3.Text = "C" Then
If TextBox2.Text < -213.15 Or TextBox2.Text > 26.85 Then
MessageBox.Show("error el rango de la T debe ser >-213.15 y <26.85 C")
Var = True
Else
T = Val(TextBox2.Text) + 273.15
End If
ElseIf ComboBox3.Text = "F" Then
If TextBox2.Text < -351.67 Or TextBox2.Text > 80.33 Then
MessageBox.Show("error el rango de la T debe ser -351.67 y 80.33 F")
Var = True
Else
T = ((TextBox2.Text - 32) / 1.8) + 273.15
End If
End If
End If
If Var = False Then
vem = V * M
vem2 = vem ^ 2
R1 = A0 * (1 - (a / vem))
R2 = B0 * (1 - (b / vem))
R3 = (Ru * T) / (vem2)
R4 = 1 - (c / (vem * T ^ 3))
R5 = vem + R2
R6 = R1 / vem2
R7 = R3 * R4 * R5 - R6
If R7 < 0 Then
Var = True
MsgBox("Error, la presiòn resultante no debe ser negativa")
Else
Label5.Text = R7
Label5.Text = Math.Round(Convert.ToDouble(R7), 4)
End If
End If
ComboBox4.SelectedIndex = 0

End Sub


Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged

If ComboBox2.Text = "m3/kg" Then
V = Val(TextBox1.Text)
ElseIf ComboBox2.Text = "cm3/g" Then
V = Val(TextBox1.Text) * 1000
ElseIf ComboBox2.Text = "ft3/lb" Then
V = Val(TextBox1.Text) * 16.01846337
ElseIf ComboBox2.Text = "in3/Oz" Then
V = Val(TextBox1.Text) * 1729.994044
End If
End Sub
Private Sub ComboBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles ComboBox1.KeyPress
e.Handled = True
End Sub
Private Sub ComboBox4_KeyPress(sender As Object, e As KeyPressEventArgs) Handles ComboBox4.KeyPress
e.Handled = True
End Sub
Private Sub TextBox2_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox2.KeyPress
If Not Char.IsDigit(e.KeyChar) AndAlso Not Char.IsControl(e.KeyChar) AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> "-" Then
e.Handled = True
End If
If e.KeyChar = "."c AndAlso TextBox2.Text.Contains(".") Then
e.Handled = True
End If
If e.KeyChar = "0"c AndAlso TextBox2.Text = "0" Then
e.Handled = True
End If
If e.KeyChar = "-"c AndAlso TextBox2.Text.Contains("-") Then
e.Handled = True
End If
End Sub

Private Sub TextBox3_KeyPress(sender As Object, e As KeyPressEventArgs)
If (Not Char.IsDigit(e.KeyChar) AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back) Then
e.Handled = True
End If
End Sub
Private Sub TextBoxt1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
If (Not Char.IsDigit(e.KeyChar) AndAlso e.KeyChar <> "." AndAlso e.KeyChar <> ControlChars.Back) Then
e.Handled = True
End If
If e.KeyChar = "."c AndAlso TextBox1.Text.Contains(".") Then
e.Handled = True
End If
If e.KeyChar = "0"c AndAlso TextBox1.Text = "0" Then
e.Handled = True
End If
End Sub


Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

End Sub

Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click

End Sub

Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click

End Sub

Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
If ComboBox3.Text = "K" Then
T = Val(TextBox2.Text)
ElseIf ComboBox3.Text = "C" Then
T = Val(TextBox2.Text) + 273.15
ElseIf ComboBox3.Text = "F" Then
T = Val(TextBox2.Text) - 32 * (5 / 9) + 273.15
ElseIf T > 60 Then
MessageBox.Show("ERROR NUMERO NO VALIDO")
ElseIf T < 300 Then
MessageBox.Show("ERROR NUMERO NO VALIDO")
End If
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Close()
End Sub
End Class
Imágen de perfil

ButtonOn-Off


Visual Basic

Publicado el 5 de Diciembre del 2023 por Leonardo
873 visualizaciones desde el 5 de Diciembre del 2023
Les traigo un OCX simple, que les servirá para representar el típico estado On-Off.

Button-OnOff-OCX

Reacciona al hacer un Click sobre el elemento, llamando al Evento Change. Desde ahí capturan el valor (TRUE ó FALSE) y realizar la acción que quieran de acuerdo a éso.

Les adjunto el código fuente, junto al OCX compilado. Espero les sea de utilidad.
Imágen de perfil
Val: 1.019
Bronce
Ha mantenido su posición en Visual Basic (en relación al último mes)
Gráfica de Visual Basic

Tekla2 – Teclado virtual_Versión_67


Visual Basic

Actualizado el 28 de Septiembre del 2023 por Rafael (25 códigos) (Publicado el 17 de Junio del 2022)
3.920 visualizaciones desde el 17 de Junio del 2022
Si está preparando un documento y el teclado se daña, este programa puede sacarlo del problema pues hace aparecer dentro de una pequeña ventana un teclado virtual que se sitúa encima del documento, ventana que usted puede arrastrar y situar donde mejor convenga, y ahí se mantendrá la ventana, obediente, hasta que la cambie de nuevo de lugar.
Este teclado virtual tiene todos los caracteres que contiene un teclado de 104 teclas y aún muchas cosas más. Además de poder escribir usted todas las letras y números con este teclado, incluyendo los caracteres especiales habidos y por haber, o vocales acentuadas, puede retroceder un carácter o avanzar un carácter, situarse al inicio de una palabra o al final de la misma, situarse al inicio de la línea o al final, situarse en la primera página del documento, o en la última. Puede poner la fecha del documento, o la hora. Todo esto con un clic. Pero, mejor no le molesto más, lea la guía del usuario adjunta y usted quedará sorprendido de todo lo que Tecla2 – Teclado Virtual puede hacer.

Untitled-1