Accueil > > > ASHSoft_annutel/2.frm
ANNUTEL3.5
ASHSoft_annutel/2.frm
Informations sur ce code source
Enfin je décide de partager un tout petit programme pour gérer les contacts téléphoniques, avec possibilité de de modification, de suppression et d'impression!
Fichier : ASHSoft_annutel/2.frm
Nombre de lignes : 615 lignes
Afficher ce fichier en plein écran
- VERSION 5.00
- Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
- Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
- Begin VB.Form enr
- BackColor = &H80000002&
- BorderStyle = 1 'Fixed Single
- Caption = "ANNUTEL 3.5 _______ Nouvel enregistrement"
- ClientHeight = 4530
- ClientLeft = 45
- ClientTop = 375
- ClientWidth = 9450
- Icon = "2.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- Picture = "2.frx":0442
- ScaleHeight = 4530
- ScaleWidth = 9450
- StartUpPosition = 2 'CenterScreen
- Begin VB.TextBox txt_cod
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 345
- Left = 1770
- Locked = -1 'True
- TabIndex = 18
- Top = 810
- Width = 2265
- End
- Begin VB.Frame Frame3
- BackColor = &H00800000&
- BorderStyle = 0 'None
- Caption = "Nouvel enregistrement"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 675
- Left = 0
- TabIndex = 9
- Top = 3840
- Width = 9465
- Begin VB.Label Label7
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "ASH SOFTWARES (C) 2012"
- BeginProperty Font
- Name = "Rockwell"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00C0C0C0&
- Height = 345
- Left = 7230
- TabIndex = 20
- Top = 180
- Width = 2115
- End
- End
- Begin VB.Frame Frame1
- BackColor = &H00800000&
- BorderStyle = 0 'None
- Caption = "Nouvel enregistrement"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 675
- Left = 0
- TabIndex = 7
- Top = 0
- Width = 9465
- Begin VB.Label Label6
- BackStyle = 0 'Transparent
- Caption = "Nouveau contact"
- BeginProperty Font
- Name = "Arial"
- Size = 14.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 375
- Left = 150
- TabIndex = 17
- Top = 180
- Width = 2625
- End
- End
- Begin VB.TextBox txt_nom
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 315
- Left = 1770
- TabIndex = 0
- Top = 1260
- Width = 5625
- End
- Begin VB.TextBox txt_ad
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 315
- Left = 1800
- TabIndex = 1
- Top = 1770
- Width = 5595
- End
- Begin VB.TextBox txt_tel
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 315
- Left = 1800
- TabIndex = 2
- Top = 2280
- Width = 5595
- End
- Begin VB.TextBox txt_not
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 945
- Left = 1800
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 3
- Top = 2790
- Width = 5595
- End
- Begin MSDataGridLib.DataGrid DataGrid2
- Bindings = "2.frx":300486
- Height = 1035
- Left = 1500
- TabIndex = 6
- Top = 3360
- Visible = 0 'False
- Width = 375
- _ExtentX = 661
- _ExtentY = 1826
- _Version = 393216
- HeadLines = 1
- RowHeight = 15
- BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- ColumnCount = 2
- BeginProperty Column00
- DataField = ""
- Caption = ""
- BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
- Type = 0
- Format = ""
- HaveTrueFalseNull= 0
- FirstDayOfWeek = 0
- FirstWeekOfYear = 0
- LCID = 1036
- SubFormatType = 0
- EndProperty
- EndProperty
- BeginProperty Column01
- DataField = ""
- Caption = ""
- BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
- Type = 0
- Format = ""
- HaveTrueFalseNull= 0
- FirstDayOfWeek = 0
- FirstWeekOfYear = 0
- LCID = 1036
- SubFormatType = 0
- EndProperty
- EndProperty
- SplitCount = 1
- BeginProperty Split0
- BeginProperty Column00
- EndProperty
- BeginProperty Column01
- EndProperty
- EndProperty
- End
- Begin MSAdodcLib.Adodc adc_tel
- Height = 330
- Left = 300
- Top = 3570
- Visible = 0 'False
- Width = 1200
- _ExtentX = 2117
- _ExtentY = 582
- ConnectMode = 0
- CursorLocation = 3
- IsolationLevel = -1
- ConnectionTimeout= 15
- CommandTimeout = 30
- CursorType = 3
- LockType = 3
- CommandType = 2
- CursorOptions = 0
- CacheSize = 50
- MaxRecords = 0
- BOFAction = 0
- EOFAction = 0
- ConnectStringType= 1
- Appearance = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=BASE.mdb;Persist Security Info=False"
- OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=BASE.mdb;Persist Security Info=False"
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "CONTACT"
- Caption = "Adodc1"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin VB.Image Image1
- Height = 1650
- Left = 7650
- Picture = "2.frx":30049C
- Top = 720
- Width = 1650
- End
- Begin VB.Label Label10
- BackStyle = 0 'Transparent
- Caption = "Code contact"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 345
- Left = 60
- TabIndex = 19
- Top = 870
- Width = 1485
- End
- Begin VB.Label Label4
- BackStyle = 0 'Transparent
- Height = 345
- Left = 7710
- MouseIcon = "2.frx":30C1F0
- MousePointer = 99 'Custom
- TabIndex = 15
- Top = 3360
- Width = 1455
- End
- Begin VB.Label Label9
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- Caption = "VALIDER"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 255
- Left = 7710
- TabIndex = 16
- Top = 3420
- Width = 1365
- End
- Begin VB.Shape Line1
- BackColor = &H000000C0&
- BackStyle = 1 'Opaque
- FillStyle = 5 'Downward Diagonal
- Height = 345
- Left = 7680
- Shape = 4 'Rounded Rectangle
- Top = 3360
- Width = 1455
- End
- Begin VB.Label Label5
- BackColor = &H00A88826&
- Height = 3135
- Left = 9330
- TabIndex = 14
- Top = 690
- Width = 135
- End
- Begin VB.Label Label12
- BackColor = &H00A88826&
- Height = 3135
- Left = 7470
- TabIndex = 13
- Top = 690
- Width = 135
- End
- Begin VB.Label Label3
- BackStyle = 0 'Transparent
- Caption = "Informations"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 405
- Left = 60
- TabIndex = 12
- Top = 3000
- Width = 1575
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "N° de téléphone"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 405
- Left = 60
- TabIndex = 11
- Top = 2280
- Width = 1575
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "Adresse"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 405
- Left = 60
- TabIndex = 10
- Top = 1770
- Width = 885
- End
- Begin VB.Shape Shape3
- BorderColor = &H00C0C0C0&
- BorderStyle = 6 'Inside Solid
- Height = 1065
- Left = 1710
- Shape = 4 'Rounded Rectangle
- Top = 2730
- Width = 5745
- End
- Begin VB.Shape Shape2
- BorderColor = &H00C0C0C0&
- BorderStyle = 6 'Inside Solid
- Height = 435
- Left = 1710
- Shape = 4 'Rounded Rectangle
- Top = 2220
- Width = 5745
- End
- Begin VB.Shape Shape14
- BorderColor = &H00C0C0C0&
- BorderStyle = 6 'Inside Solid
- Height = 435
- Left = 1710
- Shape = 4 'Rounded Rectangle
- Top = 1710
- Width = 5745
- End
- Begin VB.Shape Shape7
- BorderColor = &H00C0C0C0&
- BorderStyle = 6 'Inside Solid
- Height = 435
- Left = 1710
- Shape = 4 'Rounded Rectangle
- Top = 1200
- Width = 5745
- End
- Begin VB.Label Label8
- BackStyle = 0 'Transparent
- Caption = "Nom et prenoms"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 405
- Left = 30
- TabIndex = 8
- Top = 1260
- Width = 1635
- End
- Begin VB.Label lab_val
- BackStyle = 0 'Transparent
- Height = 435
- Left = 4890
- MousePointer = 99 'Custom
- TabIndex = 4
- Top = 3900
- Width = 1095
- End
- Begin VB.Label lab_quit
- BackStyle = 0 'Transparent
- Height = 435
- Left = 6270
- MousePointer = 99 'Custom
- TabIndex = 5
- Top = 3900
- Width = 1095
- End
- Begin VB.Shape Shape1
- BackColor = &H00400000&
- BackStyle = 1 'Opaque
- BorderColor = &H00008000&
- Height = 375
- Left = 7680
- Shape = 4 'Rounded Rectangle
- Top = 3360
- Width = 1455
- End
- End
- Attribute VB_Name = "enr"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Load()
- txt_cod.Text = "CT/" & Format(Now, "DDMMYYhhmmss")
-
- End Sub
-
-
-
- Private Sub Form_Unload(Cancel As Integer)
-
- MENU.Show
- Unload Me
-
- End Sub
-
- Private Sub Label4_Click()
- On Error Resume Next
- 'déclarations
- Dim code As String
- code = txt_nom.Text
- 'validation de données
- If Trim(txt_nom.Text) = "" Then
- MsgBox "Nom et prénoms obligatoires.", vbOKOnly + vbExclamation, "Champ vide"
- txt_nom.SetFocus
- Exit Sub
- End If
- If Trim(txt_ad.Text) = "" Then
- MsgBox "Adresse obligatoire.", vbOKOnly + vbExclamation, "Champ vide"
- txt_ad.SetFocus
- Exit Sub
- End If
- If Trim(txt_tel.Text) = "" Then
- MsgBox "Numéro de téléphone obligatoire.", vbOKOnly + vbExclamation, "Champ vide"
- txt_tel.SetFocus
- Exit Sub
- End If
- 'ENREGISTREMENT
- With adc_tel.Recordset
- .AddNew
- .Fields("cod").Value = (txt_cod.Text)
- .Fields("nom").Value = UCase(txt_nom.Text)
- .Fields("adresse").Value = (txt_ad.Text)
- .Fields("tel").Value = (txt_tel.Text)
- If txt_not.Text = "" Then
- .Fields("info").Value = ""
- Else
- .Fields("info").Value = (txt_not.Text)
- End If
- .Update
- End With
- adc_tel.Refresh
- MENU.adc_tel.Refresh
- txt_nom.Text = ""
- txt_ad.Text = ""
- txt_tel.Text = ""
- txt_not.Text = ""
-
- MENU.lab_to.Caption = "CONTACTS ENREGISTRES = " & MENU.adc_tel.Recordset.RecordCount
- MENU.adc_tel.Recordset.Sort = "nom"
- MsgBox "Enregistrement effectué avec succès.", vbOKOnly + vbInformation, "Enregistrement de " & code
- txt_cod.Text = "CT/" & Format(Now, "DDMMYYhhmmss")
- txt_nom.SetFocus
- MENU.cmdpre.Enabled = True
- MENU.cmddeb.Enabled = True
- MENU.cmdfin.Enabled = True
- MENU.cmdsui.Enabled = True
- End Sub
- Private Sub label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Line1.Visible = True
- End Sub
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Line1.Visible = False
-
- End Sub
|