fcoisb go ! go ! go ! | c'est bon (si ça peut interesser quelqu'un) ...
Code :
- Dim X1 As Single
- Dim X2 As Single
- Dim Y1 As Single
- Dim Y2 As Single
- Dim offset As Single
- ' Specify unit of measurement for coordinates on a page...
- Me.ScaleMode = 1 ' ...in twips (1440 twips = 1 inch).
- ' Define an offset of 1/8 inch from the text box to the rectangle.
- ' offset = 1440 / Me.GridX ' Convertit Grille X en twips
- 'offset = 100
- 'offset = 0
- ' X and Y coordinates for the top left corner of the box.
- X1 = Me![etat3].Left ' - offset
- Y1 = Me![etat3].Top ' - offset
- ' X and Y coordinates for the bottom right corner of the box.
- X2 = Me![etat3].Left + Me![etat3].Width' + offset
- Y2 = Me![etat3].Top + Me![etat3].Height' + offset
- Me.DrawWidth = 3 ' Width of the line (in pixels).
- 'Color = RGB(0, 0, 0) ' Use black line color.
- ' Draw the rectangle with the Line method.
- 'Me.Line (X1, Y1)-(X2, Y2)
-
- Me.Line (X1, Y1)-(X1, Y2) 'ligne gauche
- Me.Line (X2, Y1)-(X2, Y2) 'ligne droite
-
- If (nb1 = 1) Then
- Me.Line (X1, Y1)-(X2, Y1) 'ligne haut
- End If
- If (nb2 = 1) Then
- Me.Line (X1, Y2)-(X2, Y2) 'ligne bas
- End If
|
|