Accueil > > > Fuseaux.frm
GESTION ECOLAGE
Fuseaux.frm
Informations sur ce code source
Gestion d'écolage d'un établissement scolaire
• 'RTBtoHTM > Convertit le contenu d'une RichTextBox en HTML
• 'ex:RTBtest as RichtextBox, text1 as TextBox, justify as boolean
• ' >> justify permet de dire si les paragraphe
Fichier : Fuseaux.frm
Nombre de lignes : 116 lignes
Afficher ce fichier en plein écran
- VERSION 5.00
- Begin VB.Form Fuseaux
- BackColor = &H00C0C0C0&
- BorderStyle = 4 'Fixed ToolWindow
- Caption = "Sélectionnez un fuseau horaire - clic droit pour annuler - double clic pour régler l'heure système"
- ClientHeight = 6855
- ClientLeft = 45
- ClientTop = 285
- ClientWidth = 8715
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- Moveable = 0 'False
- ScaleHeight = 6855
- ScaleWidth = 8715
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.Timer TimerHeureFuseau
- Interval = 1000
- Left = 0
- Top = 0
- End
- Begin VB.Label LabelTitre
- ForeColor = &H000000FF&
- Height = 255
- Left = 0
- TabIndex = 0
- Top = 6650
- Width = 8775
- End
- End
- Attribute VB_Name = "Fuseaux"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- 'Manque: Fuseau système
-
-
- 'Variables pour la position du curseur
- Dim FFPX As Integer, FFPY As Integer, FFB As Boolean
-
- Private Sub Form_Activate()
- Me.Left = (Screen.Width - Me.Width) / 2
- Me.Top = (Screen.Height - Me.Height) / 2
- FeuillePrincipale.TimerPosition.Enabled = False
- End Sub
-
- Private Sub Form_Deactivate()
- FeuillePrincipale.TimerPosition.Enabled = True
- End Sub
-
- Private Sub Form_Load()
- Me.Picture = LoadPicture(App.Path + "\planisphère.gif")
- End Sub
-
- Private Sub Form_Unload(Cancel As Integer)
- FeuillePrincipale.TimerPosition.Enabled = True
- End Sub
-
- Private Sub Form_DblClick()
- On Error Resume Next
- Time = InputBox("Entrez la nouvelle heure système :" + vbCrLf + "(au format HH:MM:SS)", "Réglage de l'heure")
- End Sub
-
- Private Sub TimerHeureFuseau_Timer()
- LabelTitre.Caption = "Il est " & Time & " " & LoadResString(1200 + Hour(Time))
- End Sub
-
- Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If Button = vbRightButton Then Me.Hide
- FFPX = X
- FFPY = Y
- If FFPX > 14 And FFPX < 8701 And FFPY > 14 And FFPY < 586 Then
- SélectionFuseau
- Exit Sub
- End If
- If FeuillePrincipale.CfgDépOui = True Then FFB = True
- End Sub
-
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If FFB = True Then
- Move Left + (X - FFPX), Top + (Y - FFPY)
- DoEvents
- End If
- End Sub
-
- Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If FeuillePrincipale.CfgDépAimanté = True Then
- If Me.Top < 250 Then Me.Top = 0
- If Me.Top > Screen.Height - 7130 Then Me.Top = Screen.Height - 6930
- If Me.Top > Screen.Height - (28 * Screen.TwipsPerPixelY) - 7130 And Me.Top < Screen.Height - (28 * Screen.TwipsPerPixelY) - 6730 Then Me.Top = Screen.Height - (28 * Screen.TwipsPerPixelY) - 6930
- If Me.Left < 200 Then Me.Left = 0
- If Me.Left > Screen.Width - 9005 Then Me.Left = Screen.Width - 8805
- Select Case FeuillePrincipale.CfgPos
- Case 1
- If Me.Top < 620 And Me.Top > 220 Then Me.Top = 420
- Case 2
- If Me.Top < Screen.Height - (28 * Screen.TwipsPerPixelY) - 6155 And Me.Top > Screen.Height - (28 * Screen.TwipsPerPixelY) - 5755 Then Me.Top = Screen.Height - (28 * Screen.TwipsPerPixelY) - 5955
- Case 3
- If Me.Left < 620 And Me.Left > 220 Then Me.Left = 420
- Case 4
- If Me.Left < Screen.Width - 9435 And Me.Left > Screen.Width - 9005 Then Me.Left = Screen.Width - 9205
- End Select
- End If
- FFB = False
- End Sub
-
- Sub SélectionFuseau()
- If FFPX < 15 * Screen.TwipsPerPixelX - 1 Or FFPX > 574 * Screen.TwipsPerPixelX - 1 Then
- Time = "0" & Trim(Str(Int(Abs(FFPY - 585) / 290))) & ":" & Right(Time, 5)
- Else
- Time = Format(Int(Abs(FFPY - 585) / 295) + Int(((FFPX - 18 * Screen.TwipsPerPixelX) / (24 * Screen.TwipsPerPixelX)) + 1), "00") & ":" & Right(Time, 5)
- End If
- End Sub
|