Jump to content

Quero fazer um ciclo


D_Amador
 Share

Recommended Posts

Alguem me consegue explicar como consigo fazer isso com este codigo??? :wallbash:

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        
        Timer3.Enabled = True
        Dim linhasDoFicheiro As String()   'array onde serão guardadas todas as linhas do ficheiro txt

        linhasDoFicheiro = IO.File.ReadAllLines("C:\Users\Amador\Documents\Escola\Pogramação\pogramação\Economizar.txt")

        'exemplo de utilização dos dados obtidos:
        TextBox3.Text = temp_ext
        TextBox1.Text = temp_int


        If TextBox1.Text > TextBox3.Text Then
            Timer2.Enabled = True
            PictureBox2.Height = 10
            PictureBox2.Height = 10 + 5
            PictureBox2.Height = 302
            PictureBox2.Refresh()
            MsgBox("Fechar os Estores")
            Timer2.Enabled = False

        Else
            Timer2.Enabled = True
            PictureBox2.Height = 302
            PictureBox2.Height = 302 - 5
            PictureBox2.Height = 10
            PictureBox2.Refresh()
            MsgBox("Abrir os Estores ")
            Timer2.Enabled = False
        End If
        Timer4.Enabled = True
        Timer4.Interval = 2000
        If temp_int > temp_ideal Then
            Timer2.Enabled = True
            PictureBox2.Height = 10
            PictureBox2.Height = 10 + 5
            PictureBox2.Height = 302
            PictureBox2.Refresh()
            MsgBox("Fechar os Estores")
            Timer2.Enabled = False
        Else
            Timer2.Enabled = True
            PictureBox2.Height = 302
            PictureBox2.Height = 302 - 5
            PictureBox2.Height = 10
            PictureBox2.Refresh()
            MsgBox("Abrir os Estores ")
            Timer2.Enabled = False
            Timer4.Enabled = False
        End If

        Timer1.Enabled = True
       
    End Sub
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.