Accueil > > > EMPLOI DU TEMPS
EMPLOI DU TEMPS
Information sur la source
Description
ce prog fait un calendrier de la semaine courante et affiche l'emploi du temps.
Source
- Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
-
- Private Declare Sub ReleaseCapture Lib "user32" ()
- Const WM_NCLBUTTONDOWN = &HA1
- Const HTCAPTION = 2
-
- Private Largeur As Integer
- Private Hauteur As Integer
- Private Epaisseur As Integer
- Private Compte As Integer
-
- Private Sub aide_Click()
- Form8.Show
- Unload Form6
- Unload Form7
- End Sub
-
- Private Sub aide_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Unload Form6
- Unload Form7
- End Sub
-
- Private Sub edit_Click()
- Form7.Show
- Unload Form6
- Unload Form8
- End Sub
-
- Private Sub edit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Unload Form6
- Unload Form8
- End Sub
-
- Private Sub fich_Click()
- Form6.Show
- Unload Form7
- Unload Form8
- End Sub
-
- Private Sub fich_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Unload Form7
- Unload Form8
- End Sub
-
- Private Sub Form_Load()
- 'declaration des variables
- '##################################################################################
- Dim i As Integer
- Dim cpt As Integer
- '##################################################################################
- MAJ
- Compte = 1
-
- If LireINI("gen", "cours") <> vbNullString Then
- Cours
- Else
- MsgBox "Aucun cours enregistré", vbInformation
- Form4.Show
- End If
-
- End Sub
-
- Private Function MAJ()
- 'code
- '##################################################################################
-
- 'installation des jours dans les labels
- For i = 0 To 6 Step 1
- lbljour(i).Caption = Format(vbMonday + i, "dddd")
- Next i
-
- 'installation des dates dans les labels
- cpt = 0
- For i = Form3.Date1.Text To Form3.Date2 Step 1
- lbldate(cpt).Caption = i
- If lbldate(cpt).Caption = Format(Date, "dd") Then
- lbldate(cpt).ForeColor = vbRed
- Else
- lbldate(cpt).ForeColor = vbBlue
- End If
- cpt = cpt + 1
- Next i
-
- 'installation des heures dans les labels
- If LireINI("heure", "debut") = vbNullString Then
- cpt = 6
- Else
- cpt = LireINI("heure", "debut")
- End If
-
- For i = 0 To 15 Step 1
- lblheure(i).Caption = cpt & " H"
- If lblheure(i).Caption = Format(Time, "hh") & " H" Then
- lblheure(i).ForeColor = vbRed
- Else
- lblheure(i).ForeColor = vbBlue
- End If
- cpt = cpt + 1
- Next i
- '##################################################################################
- End Function
-
- Private Function Cours()
- EcarType
- k.Text = 0
- j.Text = 0
- 'affichage des cours sur la grille
- 'parcours des matireres
- While j.Text <= LireINI("mat", "cpt")
- 'verification si la matiere contient des cours
- If LireINI(j.Text, "cpt") <> vbNullString Then
- k.Text = "0"
- 'si oui
- 'parcours des cours de la matiere
- While k.Text <= LireINI(j.Text, "cpt")
- 'chargement du label representant le cours
- Load cr(Compte)
- With cr(Compte)
- .BackColor = LireINI(j.Text, "col")
- .Caption = LireINI(j.Text, "nom")
- .ToolTipText = LireINI(j.Text, k.Text & "aper")
- .Left = Largeur * Val(LireINI(j.Text, k.Text & "jour")) + planche.Left + (Epaisseur / 8)
- .Width = Epaisseur
- .Height = (Val(LireINI(j.Text, k.Text & "fh")) - Val(LireINI(j.Text, k.Text & "dh"))) * Hauteur
- .Top = (Val(LireINI(j.Text, k.Text & "dh")) - Val(LireINI("heure", "debut"))) * Hauteur + planche.Top
- .Visible = True
- .ZOrder (0)
- End With
- 'incrementation du compteur de label
- Compte = Compte + 1
- k.Text = Val(k.Text) + 1
- Wend
- End If
- j.Text = Val(j.Text) + 1
- Wend
- End Function
-
- Private Function EcarType()
- 'echel_largeur
- Largeur = planche.Width / 7
- Epaisseur = (Largeur / 5) * 4
- 'echel_hauteur
- Hauteur = planche.Height / 16
- End Function
-
-
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Unload Form6
- Unload Form7
- End Sub
-
- Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim ValRetourLng As Long
- If Button = 1 Then
- Call ReleaseCapture
- ValRetourLng = SendMessage(Form2.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
- End If
- Unload Form6
- Unload Form7
- End Sub
-
- Private Sub Image2_Click()
- End
- End Sub
-
- Private Sub Image3_Click()
- Me.WindowState = 1
- End Sub
-
- Private Sub Label1_Click()
- Form4.Show
- End Sub
-
- Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim ValRetourLng As Long
- If Button = 1 Then
- Call ReleaseCapture
- ValRetourLng = SendMessage(Form2.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
- End If
- End Sub
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "user32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2
Private Largeur As Integer
Private Hauteur As Integer
Private Epaisseur As Integer
Private Compte As Integer
Private Sub aide_Click()
Form8.Show
Unload Form6
Unload Form7
End Sub
Private Sub aide_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Unload Form6
Unload Form7
End Sub
Private Sub edit_Click()
Form7.Show
Unload Form6
Unload Form8
End Sub
Private Sub edit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Unload Form6
Unload Form8
End Sub
Private Sub fich_Click()
Form6.Show
Unload Form7
Unload Form8
End Sub
Private Sub fich_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Unload Form7
Unload Form8
End Sub
Private Sub Form_Load()
'declaration des variables
'##################################################################################
Dim i As Integer
Dim cpt As Integer
'##################################################################################
MAJ
Compte = 1
If LireINI("gen", "cours") <> vbNullString Then
Cours
Else
MsgBox "Aucun cours enregistré", vbInformation
Form4.Show
End If
End Sub
Private Function MAJ()
'code
'##################################################################################
'installation des jours dans les labels
For i = 0 To 6 Step 1
lbljour(i).Caption = Format(vbMonday + i, "dddd")
Next i
'installation des dates dans les labels
cpt = 0
For i = Form3.Date1.Text To Form3.Date2 Step 1
lbldate(cpt).Caption = i
If lbldate(cpt).Caption = Format(Date, "dd") Then
lbldate(cpt).ForeColor = vbRed
Else
lbldate(cpt).ForeColor = vbBlue
End If
cpt = cpt + 1
Next i
'installation des heures dans les labels
If LireINI("heure", "debut") = vbNullString Then
cpt = 6
Else
cpt = LireINI("heure", "debut")
End If
For i = 0 To 15 Step 1
lblheure(i).Caption = cpt & " H"
If lblheure(i).Caption = Format(Time, "hh") & " H" Then
lblheure(i).ForeColor = vbRed
Else
lblheure(i).ForeColor = vbBlue
End If
cpt = cpt + 1
Next i
'##################################################################################
End Function
Private Function Cours()
EcarType
k.Text = 0
j.Text = 0
'affichage des cours sur la grille
'parcours des matireres
While j.Text <= LireINI("mat", "cpt")
'verification si la matiere contient des cours
If LireINI(j.Text, "cpt") <> vbNullString Then
k.Text = "0"
'si oui
'parcours des cours de la matiere
While k.Text <= LireINI(j.Text, "cpt")
'chargement du label representant le cours
Load cr(Compte)
With cr(Compte)
.BackColor = LireINI(j.Text, "col")
.Caption = LireINI(j.Text, "nom")
.ToolTipText = LireINI(j.Text, k.Text & "aper")
.Left = Largeur * Val(LireINI(j.Text, k.Text & "jour")) + planche.Left + (Epaisseur / 8)
.Width = Epaisseur
.Height = (Val(LireINI(j.Text, k.Text & "fh")) - Val(LireINI(j.Text, k.Text & "dh"))) * Hauteur
.Top = (Val(LireINI(j.Text, k.Text & "dh")) - Val(LireINI("heure", "debut"))) * Hauteur + planche.Top
.Visible = True
.ZOrder (0)
End With
'incrementation du compteur de label
Compte = Compte + 1
k.Text = Val(k.Text) + 1
Wend
End If
j.Text = Val(j.Text) + 1
Wend
End Function
Private Function EcarType()
'echel_largeur
Largeur = planche.Width / 7
Epaisseur = (Largeur / 5) * 4
'echel_hauteur
Hauteur = planche.Height / 16
End Function
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Unload Form6
Unload Form7
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ValRetourLng As Long
If Button = 1 Then
Call ReleaseCapture
ValRetourLng = SendMessage(Form2.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
Unload Form6
Unload Form7
End Sub
Private Sub Image2_Click()
End
End Sub
Private Sub Image3_Click()
Me.WindowState = 1
End Sub
Private Sub Label1_Click()
Form4.Show
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ValRetourLng As Long
If Button = 1 Then
Call ReleaseCapture
ValRetourLng = SendMessage(Form2.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
Conclusion
bonne prog
NeoCortex
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
TECHDAYS PARIS 2010 : PLAN DE MIGRATION VERS SHAREPOINT 2010TECHDAYS PARIS 2010 : PLAN DE MIGRATION VERS SHAREPOINT 2010 par ROMELARD Fabrice
Animé par: Arnault Nouvel et Antoine Dongois Le processus à prendre : Apprendre (découvrir la plateforme) Préparer (documenter l'historique et choisir la méthode de MAJ) Test (Test de MAJ) Implémenter (Effectuer la MAJ) Valid...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2010 : LA PLEINIèRE DU SECOND JOURTECHDAYS PARIS 2010 : LA PLEINIèRE DU SECOND JOUR par ROMELARD Fabrice
Après un retour sur l'histoire des TechDays de Paris et le fait que ce soit le plus gros event MS au monde (du fait de sa gratuité), le président de MS France (Eric Boustoullier) a fait une présentation de la vision Microsoft pour les années à venir...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice CRéATION D'UNE BASE DE DONNéE SOUS SQL AZURECRéATION D'UNE BASE DE DONNéE SOUS SQL AZURE par junarnoalg
Sans rentrer dans les détails, je me propose ici de faire un rapide tour de ce que propose SQL Azure.
SQL Azure est avant tout un service d'hébergement de base de données relationnelles construit sur SQL Server. Il permet aux entreprises d...
Cliquez pour lire la suite de l'article par junarnoalg
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
Comparez les prix

HTC Hero
Entre 550€ et 550€
|