
04/10/2009, 23:17
|
 | | | Fecha de Ingreso: julio-2009 Ubicación: Mexico
Mensajes: 60
Antigüedad: 15 años, 10 meses Puntos: 1 | |
Registrador Registrador: principal.frm(Form1):
Código vb:
Ver originalPrivate Sub Form_Load() Dim running As Integer running = App.PrevInstance If running <> 0 Then MsgBox "El Programa ya se esta ejecutando", 0 + 48, "News" End End If End Sub Private Sub pc1_Click() statuspc = 1 If Label1.Caption = "DISPONIBLE" Then Unload principal registro.Show Else MsgBox "Elige otra computadora, esta ya esta ocupada =(", vbCritical, "Error" End If End Sub Private Sub pc2_Click() statuspc = 2 If Label2.Caption = "DISPONIBLE" Then Unload principal registro.Show Else MsgBox "Elige otra computadora, esta ya esta ocupada =(", vbCritical, "Error" End If End Sub Private Sub pc3_Click() statuspc = 3 If Label3.Caption = "DISPONIBLE" Then Unload principal registro.Show Else MsgBox "Elige otra computadora, esta ya esta ocupada =(", vbCritical, "Error" End If End Sub Private Sub pc4_Click() statuspc = 4 If Label4.Caption = "DISPONIBLE" Then Unload principal registro.Show Else MsgBox "Elige otra computadora, esta ya esta ocupada =(", vbCritical, "Error" End If End Sub Private Sub pc5_Click() statuspc = 5 If Label5.Caption = "DISPONIBLE" Then Unload principal registro.Show Else MsgBox "Elige otra computadora, esta ya esta ocupada =(", vbCritical, "Error" End If End Sub
registro.frm(Form2):
Código vb:
Ver originalPrivate Sub Form_Load() Command1.Enabled = False End Sub Private Sub apellidop_Change() If apellidop.Text <> "" And apellidom.Text <> "" And nombre.Text <> "" And cuenta.Text <> "" Then Command1.Enabled = True Else Command1.Enabled = False End If End Sub Private Sub apellidom_Change() If apellidop.Text <> "" And apellidom.Text <> "" And nombre.Text <> "" And cuenta.Text <> "" Then Command1.Enabled = True Else Command1.Enabled = False End If End Sub Private Sub nombre_Change() If apellidop.Text <> "" And apellidom.Text <> "" And nombre.Text <> "" And cuenta.Text <> "" Then Command1.Enabled = True Else Command1.Enabled = False End If End Sub Private Sub cuenta_Change() If apellidop.Text <> "" And apellidom.Text <> "" And nombre.Text <> "" And cuenta.Text <> "" Then Command1.Enabled = True Else Command1.Enabled = False End If End Sub Private Sub Command1_Click() MsgBox "Registrado. Disfruta tu estancia", vbInformation, "Registro exitoso" Sleep 250 Call Ocuparpc Sleep 250 'Registro BD Sleep 250 apellidop.Text = "" apellidom.Text = "" nombre.Text = "" cuenta.Text = "" Sleep 250 Unload registro principal.Show End Sub Private Sub Command2_Click() apellidop.Text = "" apellidom.Text = "" nombre.Text = "" cuenta.Text = "" Sleep 250 Unload registro principal.Show End Sub
funciones.bas(Module1):
Código vb:
Ver originalFunction Limpiaregistro() End Function Function Bloquearpc() End Function Function Ocuparpc() Select Case principal.statuspc Case 1 principal.Label1.Caption = "NO DISPONIBLE" Case 2 principal.Label2.Caption = "NO DISPONIBLE" Case 3 principal.Label3.Caption = "NO DISPONIBLE" Case 4 principal.Label4.Caption = "NO DISPONIBLE" Case 5 principal.Label5.Caption = "NO DISPONIBLE" End Select End Function
Aquí les dejo el proyecto:
rapidshare.com/files/288825115/Centro_de_computo.rar
Última edición por BaByRoDrI; 04/10/2009 a las 23:22 |