'Voici le code de la form qui vous permet d'intégrer 'un calendrier style Money* à votre application. ' 'COMMENT RECUPERER CE CODE ? '1 - Enregistrez ce fichier sur votre ordinateur. '2 - Renommez le avec une extension FRM. '3 - Démarrer un nouveau projet Visual Basic* ou ouvrez un projet existant. '4 - Ajoutez le fichier à ce projet. '5 - Double-cliquez sur la form dans l'explorateur de projet pour afficher la form. ' ' '*propriété de MicroSoft ' '********************* VOICI LE CODE DE LA FORM ************************** ' VERSION 5.00 Begin VB.Form frmCalendrier_2 BorderStyle = 1 'Fixed Single ClientHeight = 3030 ClientLeft = 6780 ClientTop = 4935 ClientWidth = 3330 ControlBox = 0 'False Icon = "frmCalendrier_2.frx":0000 LinkTopic = "Form1" LockControls = -1 'True MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3030 ScaleWidth = 3330 Begin VB.ComboBox cboJour BackColor = &H00FFFFFF& BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 315 Left = 480 MouseIcon = "frmCalendrier_2.frx":000C MousePointer = 99 'Custom Style = 2 'Dropdown List TabIndex = 59 ToolTipText = "Liste des jours" Top = 2595 Visible = 0 'False Width = 795 End Begin VB.PictureBox Curseur Height = 495 Left = 2400 Picture = "frmCalendrier_2.frx":0316 ScaleHeight = 435 ScaleWidth = 495 TabIndex = 58 Top = 2340 Visible = 0 'False Width = 555 End Begin VB.ComboBox cboAnnees Appearance = 0 'Flat BackColor = &H00FFFFFF& BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 315 Left = 1380 MouseIcon = "frmCalendrier_2.frx":0620 MousePointer = 99 'Custom Style = 2 'Dropdown List TabIndex = 57 ToolTipText = "Liste des années" Top = 2520 Visible = 0 'False Width = 975 End Begin VB.ComboBox cboMois Appearance = 0 'Flat BackColor = &H00FFFFFF& BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 315 ItemData = "frmCalendrier_2.frx":092A Left = 120 List = "frmCalendrier_2.frx":092C MouseIcon = "frmCalendrier_2.frx":092E MousePointer = 99 'Custom Style = 2 'Dropdown List TabIndex = 56 ToolTipText = "Liste des mois" Top = 2340 Visible = 0 'False Width = 1515 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 41 Left = 2295 MousePointer = 99 'Custom TabIndex = 54 Top = 1860 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 40 Left = 1905 MousePointer = 99 'Custom TabIndex = 53 Top = 1860 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 39 Left = 1515 MousePointer = 99 'Custom TabIndex = 52 Top = 1860 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 38 Left = 1125 MousePointer = 99 'Custom TabIndex = 51 Top = 1860 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 37 Left = 735 MousePointer = 99 'Custom TabIndex = 50 Top = 1860 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 36 Left = 345 MousePointer = 99 'Custom TabIndex = 49 Top = 1860 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 35 Left = -45 MousePointer = 99 'Custom TabIndex = 48 Top = 1860 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 34 Left = 2295 MousePointer = 99 'Custom TabIndex = 47 Top = 1590 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 33 Left = 1905 MousePointer = 99 'Custom TabIndex = 46 Top = 1590 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 32 Left = 1515 MousePointer = 99 'Custom TabIndex = 45 Top = 1590 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 31 Left = 1125 MousePointer = 99 'Custom TabIndex = 44 Top = 1590 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 30 Left = 735 MousePointer = 99 'Custom TabIndex = 43 Top = 1590 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 29 Left = 345 MousePointer = 99 'Custom TabIndex = 42 Top = 1590 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 28 Left = -45 MousePointer = 99 'Custom TabIndex = 41 Top = 1590 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 27 Left = 2295 MousePointer = 99 'Custom TabIndex = 40 Top = 1320 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 26 Left = 1905 MousePointer = 99 'Custom TabIndex = 39 Top = 1320 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 25 Left = 1515 MousePointer = 99 'Custom TabIndex = 38 Top = 1320 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 24 Left = 1125 MousePointer = 99 'Custom TabIndex = 37 Top = 1320 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 23 Left = 735 MousePointer = 99 'Custom TabIndex = 36 Top = 1320 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 22 Left = 345 MousePointer = 99 'Custom TabIndex = 35 Top = 1320 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 21 Left = -45 MousePointer = 99 'Custom TabIndex = 34 Top = 1320 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 20 Left = 2295 MousePointer = 99 'Custom TabIndex = 33 Top = 1050 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 19 Left = 1905 MousePointer = 99 'Custom TabIndex = 32 Top = 1050 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 18 Left = 1515 MousePointer = 99 'Custom TabIndex = 31 Top = 1050 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 17 Left = 1125 MousePointer = 99 'Custom TabIndex = 30 Top = 1050 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 16 Left = 735 MousePointer = 99 'Custom TabIndex = 29 Top = 1050 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 15 Left = 345 MousePointer = 99 'Custom TabIndex = 28 Top = 1050 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 14 Left = -45 MousePointer = 99 'Custom TabIndex = 27 Top = 1050 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 13 Left = 2295 MousePointer = 99 'Custom TabIndex = 26 Top = 780 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 12 Left = 1905 MousePointer = 99 'Custom TabIndex = 25 Top = 780 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 11 Left = 1515 MousePointer = 99 'Custom TabIndex = 24 Top = 780 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 10 Left = 1125 MousePointer = 99 'Custom TabIndex = 23 Top = 780 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 9 Left = 735 MousePointer = 99 'Custom TabIndex = 22 Top = 780 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 8 Left = 345 MousePointer = 99 'Custom TabIndex = 21 Top = 780 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 7 Left = -45 MousePointer = 99 'Custom TabIndex = 20 Top = 780 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 6 Left = 2295 MousePointer = 99 'Custom TabIndex = 19 Top = 510 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 5 Left = 1905 MousePointer = 99 'Custom TabIndex = 18 Top = 510 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 4 Left = 1515 MousePointer = 99 'Custom TabIndex = 17 Top = 510 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 3 Left = 1125 MousePointer = 99 'Custom TabIndex = 16 Top = 510 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 2 Left = 735 MousePointer = 99 'Custom TabIndex = 15 Top = 510 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 1 Left = 345 MousePointer = 99 'Custom TabIndex = 14 Top = 510 Width = 405 End Begin VB.Label lblJourSemaine Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00FFFFFF& BorderStyle = 1 'Fixed Single Caption = "11" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 285 Index = 0 Left = -45 MousePointer = 99 'Custom TabIndex = 13 Top = 510 Width = 405 End Begin VB.Label lblAnnee Alignment = 2 'Center BackStyle = 0 'Transparent Caption = "2002" Height = 195 Left = 1875 TabIndex = 12 ToolTipText = "Année sélectionnée" Top = 30 Width = 495 End Begin VB.Label lblMois Alignment = 2 'Center AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Septembre" ForeColor = &H00000000& Height = 195 Left = 330 TabIndex = 11 ToolTipText = "Mois sélectionné" Top = 30 Width = 795 End Begin VB.Label lblAnneeSuivante Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = ">>" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 195 Left = 2415 TabIndex = 10 ToolTipText = "Année suivante" Top = 30 Width = 225 End Begin VB.Label lblAnneePrecedente Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "<<" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 195 Left = 1575 TabIndex = 9 ToolTipText = "Année précédente" Top = 30 Width = 225 End Begin VB.Label lblMoisSuivant Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = ">>" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 195 Left = 1185 TabIndex = 8 ToolTipText = "Mois suivant" Top = 30 Width = 225 End Begin VB.Label lblJour Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Dim" ForeColor = &H00FFFFFF& Height = 195 Index = 6 Left = 2355 TabIndex = 6 ToolTipText = "Dimanche" Top = 300 Width = 270 End Begin VB.Label lblJour Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Sam" ForeColor = &H00FFFFFF& Height = 195 Index = 5 Left = 1935 TabIndex = 5 ToolTipText = "Samedi" Top = 300 Width = 315 End Begin VB.Label lblJour Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Ven" ForeColor = &H00FFFFFF& Height = 195 Index = 4 Left = 1560 TabIndex = 4 ToolTipText = "Vendredi" Top = 300 Width = 285 End Begin VB.Label lblJour Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Jeu" ForeColor = &H00FFFFFF& Height = 195 Index = 3 Left = 1185 TabIndex = 3 ToolTipText = "Jeudi" Top = 300 Width = 255 End Begin VB.Label lblJour Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Mer" ForeColor = &H00FFFFFF& Height = 195 Index = 2 Left = 780 TabIndex = 2 ToolTipText = "Mercredi" Top = 300 Width = 270 End Begin VB.Label lblJour Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Mar" ForeColor = &H00FFFFFF& Height = 195 Index = 1 Left = 420 TabIndex = 1 ToolTipText = "Mardi" Top = 300 Width = 270 End Begin VB.Label lblJour Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "Lun" ForeColor = &H00FFFFFF& Height = 195 Index = 0 Left = 15 TabIndex = 0 ToolTipText = "Lundi" Top = 300 Width = 270 End Begin VB.Label lblMoisPrecedent Appearance = 0 'Flat AutoSize = -1 'True BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "<<" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00000000& Height = 195 Left = 45 TabIndex = 7 ToolTipText = "Mois précédent" Top = 30 Width = 225 End Begin VB.Label Label2 Appearance = 0 'Flat BackColor = &H00000000& BorderStyle = 1 'Fixed Single ForeColor = &H80000008& Height = 255 Left = -60 TabIndex = 55 Top = 270 Width = 2760 End End Attribute VB_Name = "frmCalendrier_2" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit ' 'date Private jour As String Private mois As String Private Annee As String 'nombre de jours du mois selectionne Private Nb_Jours As Integer 'pour boucles Private I As Integer Private Y As Integer 'date recuperable lors du dechargement de la feuille Public date_selectionnee As String 'indicateur de chargement Public chargement As Boolean Private Sub cboAnnees_Click() ' Annee = cboAnnees.Text ' Call Calcul_Nombre_Jours Call Afficher_Jours ' lblAnnee.Caption = cboAnnees.Text ' End Sub Private Sub cboJour_Click() ' 'jour selectionne jour = Format$(Val(cboJour.ListIndex) + 1, "00") ' 'afficher le jour selectionne en marron For I = 0 To 41 With lblJourSemaine(I) .BackColor = &HFFFFFF .ForeColor = &H0& .FontBold = False If .Caption = jour Then Y = I End With Next I With lblJourSemaine(Y) .BackColor = &HC0& .ForeColor = &HFFFFFF .FontBold = True End With End Sub Private Sub cboMois_Click() ' 'numero de mois(ex: 01) mois = Format$(cboMois.ListIndex + 1, "00") ' Call Calcul_Nombre_Jours Call Afficher_Jours ' lblMois.Caption = cboMois.Text ' End Sub Private Sub Form_Load() 'calendrier à integrer dans votre application 'exemple d'appel de la fenetre. celle ci s'appelle frmCalendrier_2 'et vous voulez afficher la date selectionnee dans une zone de texte Text1 par exemple 'en appuyant sur le bouton Command1 ' '******DEBUT DU CODE 'Private Sub Command1_Click() 'Load frmCalendrier_2 'charge la feuille en memoire With frmCalendrier_2 'position de la fenetre '.Top = X 'mettez ici la position en hauteur X de la fenetre '.Left = Y 'mettez ici la position en hauteur Y de la fenetre .Height = 2160 'mettez ici la hauteur de la fenetre .Width = 2700 'mettez ici la largeur de la fenetre '.Show vbModal 'affiche la fenetre 'Text1.Text = .date_selectionnee 'ecrit la date selectionnee dans la zone de texte End With 'end sub 'voila, rien de plus simple. En prime voici 'quelques differents formats de date possibles et ce qu'il affichent 'le format par defaut en retour est "dd/mm/yyyy" soit 14/02/2002 'Text1.Text = Format$(.date_selectionnee, "dd/mm/yy") '14/02/02 'Text1.Text = Format(.date_selectionnee, "dd/mm/yyyy") '14/02/2002 'Text1.Text = Format$(.date_selectionnee, "dddd d mmmm yyyy") 'jeudi 14 février 2002 'Text1.Text = Format(.date_selectionnee, "ddd d mmmm yyyy") 'jeu. 14 février 2002 'Text1.Text = Format(.date_selectionnee, "ddd dd/mm/yy") ' jeu. 14/02/02 'Text1.Text = Format(.date_selectionnee, "ddd dd/mm/yyyy") 'jeu. 14/02/2002 'Text1.Text = Format(.date_selectionnee, "dddd d/mm/yy") ' jeudi 14/02/02 'Text1.Text = Format(.date_selectionnee, "dddd d/mm/yyyy") 'jeudi 14/02/2002 'Text1.Text = Format(.date_selectionnee, "ddd d mmm yyyy") 'jeu. 14 févr 2002 'Text1.Text = Format(.date_selectionnee, "ddd d mmm yy") 'jeu. 14 févr 02 'Text1.Text = Format(.date_selectionnee, "dd mmm yy") '14 févr 02 'Text1.Text = Format(.date_selectionnee, "dd mmmm yy") '14 février 02 'Text1.Text = Format(.date_selectionnee, "dd mmm yyyy") '14 févr 2002 'Text1.Text = Format(.date_selectionnee, "dd mmmm yyyy") '14 février 2002 'Text1.Text = Format(.date_selectionnee, "dddd d mmmm yy") 'jeudi 14 février 02 'Text1.Text = Format(.date_selectionnee, "ddd d mmmm yy") 'jeu. 14 février 02 '*******FIN DU CODE ' ' ' mois, annee et jour actuel Annee = Format$(Year(Now), "0000") mois = Format$(Month(Now), "00") jour = Format$(Day(Now), "00") ' 'JOUR Call Calcul_Nombre_Jours Call Afficher_Jours ' 'MOIS With cboMois .Clear .AddItem "Janvier" .AddItem "Février" .AddItem "Mars" .AddItem "Avril" .AddItem "Mai" .AddItem "Juin" .AddItem "Juillet" .AddItem "Août" .AddItem "Septembre" .AddItem "Octobre" .AddItem "Novembre" .AddItem "Décembre" .ListIndex = Val(mois) - 1 End With ' 'ANNEES cboAnnees.Clear For I = 1900 To 2100 cboAnnees.AddItem CStr(I) Next I cboAnnees.ListIndex = Val(Annee) - 1900 ' ' 'initialisation des variables date_selectionnee = jour & "/" & mois & "/" & Annee ' ' ' End Sub Private Sub Afficher_Jours() ' chargement = True ' cboJour.Clear For I = 1 To Nb_Jours cboJour.AddItem Format$(I, "00") Next I ' 'trouve le 1er jour du mois Select Case LCase$(Left$(Format("01/" & mois & "/" & Annee, "dddd d mmmm yyyy"), 2)) Case "lu" Y = 0 Case "ma" Y = 1 Case "me" Y = 2 Case "je" Y = 3 Case "ve" Y = 4 Case "sa" Y = 5 Case "di" Y = 6 End Select 'afficher les jours For I = 0 To 41 With lblJourSemaine(I) .ToolTipText = "" .Caption = "" .BackStyle = 1 .BackColor = &HFFFFFF .ForeColor = &H0& .MousePointer = 0 End With Next I For I = 1 To Nb_Jours With lblJourSemaine(Y) .Caption = Format$(I, "00") .MousePointer = 99 .MouseIcon = Curseur.Picture .ToolTipText = "Jour: " & Format(Str$(I), "00") & " " & cboMois.Text & " " & Annee End With Y = Y + 1 Next I ' 'selectionner le jour For I = 0 To 41 If Val(lblJourSemaine(I).Caption) = Val(jour) Then lblJourSemaine_Click I chargement = False Exit Sub End If Next I ' ' End Sub Private Sub Calcul_Nombre_Jours() ' 'determiner le nombre de jours du mois selectionne Select Case Val(mois) - 1 Case 3, 5, 8, 10 'mois de 30 jours Nb_Jours = 30 Case 1 'mois de fevrier Nb_Jours = IIf(Bissextile(Val(Annee)) = True, 29, 28) 'annee bissextile ou non Case Else 'mois de 31 jours Nb_Jours = 31 End Select ' If Val(jour) > Nb_Jours Then jour = Format(Nb_Jours, "00") ' ' End Sub Private Function Bissextile(Annee As Integer) As Boolean 'pour savoir si une annee est bissextile 'les regles précises: '1°regle : Une année bisexstile survient tout les 4 ans '2°regle : mais tout les cent ans il n'y en a pas '3°regle : mais tout les 400 ans la regle 2 n'est plus valide ' If Annee Mod 4 = 0 And (Annee Mod 100 <> 0 Or Annee Mod 400 = 0) Then Bissextile = True Else Bissextile = False End If ' ' End Function Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisPrecedent.BorderStyle = 0 lblMoisSuivant.BorderStyle = 0 lblAnneePrecedente.BorderStyle = 0 lblAnneeSuivante.BorderStyle = 0 End Sub Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisPrecedent.BorderStyle = 0 lblMoisSuivant.BorderStyle = 0 lblAnneePrecedente.BorderStyle = 0 lblAnneeSuivante.BorderStyle = 0 End Sub Private Sub lblAnnee_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisPrecedent.BorderStyle = 0 lblMoisSuivant.BorderStyle = 0 lblAnneePrecedente.BorderStyle = 0 lblAnneeSuivante.BorderStyle = 0 End Sub Private Sub lblAnneePrecedente_Click() ' I = cboAnnees.ListIndex If I > 0 Then cboAnnees.ListIndex = I - 1 lblAnnee.Caption = cboAnnees.Text ' End Sub Private Sub lblAnneePrecedente_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblAnneePrecedente.BorderStyle = 1 End Sub Private Sub lblAnneeSuivante_Click() ' I = cboAnnees.ListIndex If I < cboAnnees.ListCount - 1 Then cboAnnees.ListIndex = I + 1 lblAnnee.Caption = cboAnnees.Text ' End Sub Private Sub lblAnneeSuivante_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblAnneeSuivante.BorderStyle = 1 End Sub Private Sub lblJour_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisPrecedent.BorderStyle = 0 lblMoisSuivant.BorderStyle = 0 lblAnneePrecedente.BorderStyle = 0 lblAnneeSuivante.BorderStyle = 0 End Sub Private Sub lblJourSemaine_Click(Index As Integer) ' If lblJourSemaine(Index).Caption <> "" Then cboJour.ListIndex = Val(lblJourSemaine(Index).Caption) - 1 date_selectionnee = jour & "/" & mois & "/" & Annee If chargement = False Then 'MsgBox date_selectionnee Unload Me End If End If ' End Sub Private Sub lblJourSemaine_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisPrecedent.BorderStyle = 0 lblMoisSuivant.BorderStyle = 0 lblAnneePrecedente.BorderStyle = 0 lblAnneeSuivante.BorderStyle = 0 End Sub Private Sub lblMois_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisPrecedent.BorderStyle = 0 lblMoisSuivant.BorderStyle = 0 lblAnneePrecedente.BorderStyle = 0 lblAnneeSuivante.BorderStyle = 0 End Sub Private Sub lblMoisPrecedent_Click() ' I = cboMois.ListIndex If I > 0 Then cboMois.ListIndex = I - 1 lblMois.Caption = cboMois.Text ' End Sub Private Sub lblMoisPrecedent_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisPrecedent.BorderStyle = 1 End Sub Private Sub lblMoisSuivant_Click() ' I = cboMois.ListIndex If I < 11 Then cboMois.ListIndex = I + 1 lblMois.Caption = cboMois.Text ' End Sub Private Sub lblMoisSuivant_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblMoisSuivant.BorderStyle = 1 End Sub