1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
| VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5865
ClientLeft = 60
ClientTop = 450
ClientWidth = 7980
LinkTopic = "Form1"
ScaleHeight = 5865
ScaleWidth = 7980
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text1
Height = 615
Left = 2520
TabIndex = 5
Text = " "
Top = 3840
Width = 2055
End
Begin VB.CommandButton Command2
Caption = "Entrez graphe"
Height = 615
Left = 480
TabIndex = 4
Top = 3840
Width = 1695
End
Begin MSFlexGridLib.MSFlexGrid graph
Height = 3135
Left = 2760
TabIndex = 3
Top = 360
Width = 4455
_ExtentX = 7858
_ExtentY = 5530
_Version = 393216
End
Begin VB.CommandButton Command1
Caption = "Minimiser graphe"
Height = 495
Left = 360
TabIndex = 2
Top = 4920
Width = 2175
End
Begin VB.TextBox nbrecol
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1036
SubFormatType = 1
EndProperty
Height = 495
Left = 360
TabIndex = 1
Text = " "
Top = 1080
Width = 1695
End
Begin VB.TextBox nbreLigne
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1036
SubFormatType = 1
EndProperty
Height = 495
Left = 360
TabIndex = 0
Text = " "
Top = 360
Width = 1695
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Form1.grapheDeterministe
End Sub
Private Sub Command2_Click()
graph.Rows = Form1.nbreLigne
graph.Cols = Form1.nbrecol
graph.MousePointer = flexUpArrow
graph.Text = Form1.Text1
End Sub
Public Function grapheDeterministe()
For Row = 0 To graph.Rows
For Column = 0 To graph.Cols
k = 0
Do While k <= graph.Cols
If graph.TextMatrix(Row, k) = graph.TextMatrix(Row, k + 1) Then
graph.TextMatrix(Row, k + 1) = "nil" 'nil veut dire q'il y a pas de transistion
' entre les deux état traitées
For Row = 0 To graph.Rows
For Column = k To graph.Cols
graph.TextMatrix(Row, k) = graph.TextMatrix(Row, k + t)
Next
Next
Else
k = k + 1
End If
Exit Do
Loop
Next Column
Next Row
End Function |
Partager