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
XNA IS DEAD!XNA IS DEAD! par richardc
Depuis la semaine dernière (et grâce aux TechDays 2012), je me penche activement sur la nouvelle version de Windows, aka Windows 8. Vous me direz, il était temps puisque la première preview date de Septembre dernier.
OK. Remarquez, on n'en est qu'aux...
Cliquez pour lire la suite de l'article par richardc TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 !TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 ! par ROMELARD Fabrice
Speakers: Fabrice Meillon et Stanislas Quastana Cette session est basée entièrement sur celle donnée lors de la BUILD cet hiver. Il n'y a pas d'ajout d'information en rapport avec cet évènement passé. Windows 8 Server sera intégralem...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [HTML5] AUTOUR DU W3C : NOUVEAUX STANDARDS ET WEB MOBILE (LILLE)[HTML5] AUTOUR DU W3C : NOUVEAUX STANDARDS ET WEB MOBILE (LILLE) par Gio
Je m'y prends un peu tard je sais, mais bon je suis développeur web et donc hyper fainéant ! Toujours dans le cadre des technologies émergentes, ici HTML5, parce qu'on aime HTML5 chez Wyg , nous seront présent, le vieux ( Aurélien V.) et moi, pour pr...
Cliquez pour lire la suite de l'article par Gio [WP7] DYNAMICALLY CHANGE STARTUP PAGE[WP7] DYNAMICALLY CHANGE STARTUP PAGE par KooKiz
Let's say that you want to allow the user to customize the startup page of your application. You can easily change the startup page by editing the 'NavigationPage' attribute in the manifest file. But the manifest cannot be modified once the applicatio...
Cliquez pour lire la suite de l'article par KooKiz
Logiciels
DocTranslate (V3.1.0.0)DOCTRANSLATE (V3.1.0.0)DocTranslate est un traducteur de document Microsoft Word, PowerPoint et Excel. Il permet d'autom... Cliquez pour télécharger DocTranslate Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System
|