PROGRAMACIÓ D'APLICACIONS EDUCATIVES AMB VISUAL BASICMÒDUL 1

Fitxer: m2p3.frm

Definició dels objectes. Interfície d'usuari

Recordeu que això no ho podeu editar directament. Per fer-ho incorporeu nous objectes de la paleta en el vostre formulari. I per canviar els valors seleccioneu l'objecte i escolliu la propietat a canviar en la finestra Properties.

VERSION 5.00
Begin VB.Form frmRellotge 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Rellotge"
   ClientHeight    =   405
   ClientLeft      =   1860
   ClientTop       =   1530
   ClientWidth     =   1890
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   8.25
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000008&
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   405
   ScaleWidth      =   1890
   Begin VB.TextBox txtHora 
      Appearance      =   0  'Flat
      BorderStyle     =   0  'None
      Enabled         =   0   'False
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   1455
   End
   Begin VB.Timer trmRellotge 
      Interval        =   100
      Left            =   1440
      Top             =   0
   End
End


Codi del programa. Programació de respostes a events

Attribute VB_Name = "frmRellotge"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub trmRellotge_Timer()
    txtHora.Text = Format(Now, "hh:mm:ss")
End Sub