Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi! i have a code where i need to show if a computer is mal functioning, i'm using vb.net. the user have a form where he insert the problems like: mouse, keyboard in checkboxes, and then when he closes it a textbox appears showing "malfunction" but when i close it the textbox dissapears so i was wondering if i can link it somehow with the database, i also have a button that i need to make the error disappears when it's solved, thank you very much

What I have tried:

here's a example of the code
VB.NET
Private Sub Button26_Click(sender As Object, e As EventArgs) Handles btnErro1.Click
       conecta()
       Dim oktoDelete As MsgBoxResult = MsgBox("Tem certeza que deseja excluir o registro do erro?", MsgBoxStyle.YesNo)
       If oktoDelete = MsgBoxResult.Yes Then
           Dim str As String
           str = "Delete from Lab01Micro01 ([Nome_Do_Professor], [Nome_Professor_Substituto], [Numero_De_Registro], [Disciplina], [Turma], [Professor_Ausente?], [Reservado?], [Ocupado?])"
           Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
           Try
               cmd.ExecuteNonQuery()
               cmd.Dispose()
               myConnection.Close()

           Catch ex As Exception

           End Try
       ElseIf oktoDelete = MsgBoxResult.No Then
       End If
       lblFuncionamento1.Visible = True
       lblFuncionamento2.Visible = False
       btnErro1.Visible = False
       btnM1.BackgroundImage = System.Drawing.Bitmap.FromFile("C:\TCC\computador3a.png")
   End Sub

   Private Sub Button34_Click(sender As Object, e As EventArgs) Handles btnErro2.Click
       lblFuncionamento4.Visible = True
       lblFuncionamento3.Visible = False
       btnErro2.Visible = False
       btnM2.BackgroundImage = System.Drawing.Bitmap.FromFile("C:\TCC\computador3a.png")
   End Sub
Posted
Comments
Richard MacCutchan 17-Nov-16 12:48pm    
Which elements are the ones that disappear?
Disappear why and how? Did you debug?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900