Comment réaliser un RDP
hayethayet
Messages postés
5
Date d'inscription
Statut
Membre
Dernière intervention
-
hayethayet Messages postés 5 Date d'inscription Statut Membre Dernière intervention -
hayethayet Messages postés 5 Date d'inscription Statut Membre Dernière intervention -
Bonjour!?
voici j'ai un form contient un bouton et 3 combobox,
la première contient:
Citation:
place1(P1)
place2(P2)
place3(P3)
et la deuxième contient:
Citation:
transition1(T1)
transition2(T2)
transition3(T3)
la troisieme contient:
Citation:
Agent1(A1)
Agent2(A2)
Agent3(A3)
Par exemple lorsque je choisi (P1), (T1)et (A1) et je clic sur le bouton, il apparaît un graphe RDP qui contient 2 cercles.Le premier cercle contient (P1) et le deuxième (A1) qui sont reliées à une transition(T1).
voici le code que j'utilise
il ya un erreur dans ce ligne ( If ComboBox1.Text = "P1" & ComboBox2.Text = "T1" & ComboBox3.Text = "A1" ) l'erreur est:
Conversion from string "T1" to type 'Boolean' is not valid.
je ne sais pas comment utilise le boucle if en vb
Aidez-moi SVP pour corriger cette erreur
voici j'ai un form contient un bouton et 3 combobox,
la première contient:
Citation:
place1(P1)
place2(P2)
place3(P3)
et la deuxième contient:
Citation:
transition1(T1)
transition2(T2)
transition3(T3)
la troisieme contient:
Citation:
Agent1(A1)
Agent2(A2)
Agent3(A3)
Par exemple lorsque je choisi (P1), (T1)et (A1) et je clic sur le bouton, il apparaît un graphe RDP qui contient 2 cercles.Le premier cercle contient (P1) et le deuxième (A1) qui sont reliées à une transition(T1).
voici le code que j'utilise
Public Class Form1 Dim P1, P2, P3 As Object Dim T1, T2, T3 As Object Dim A1, A2, A3 As Object Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint If ComboBox1.Text = "P1" & ComboBox2.Text = "T1" & ComboBox3.Text = "A1" Then e.Graphics.DrawEllipse(New Pen(Color.DarkCyan), New Rectangle(10, 10, 50, 50)) e.Graphics.DrawString("P1", New Font("Arial", 12), New SolidBrush(Color.Blue), 23, 25) e.Graphics.DrawLine(New Pen(Color.DarkMagenta), New Point(60, 35), New Point(100, 35)) e.Graphics.DrawString("T1", New Font("Arial", 12), New SolidBrush(Color.Blue), 67, 12) e.Graphics.FillRectangle(New SolidBrush(Color.Red), 77, 30, 2, 10) e.Graphics.DrawEllipse(New Pen(Color.DarkCyan), New Rectangle(100, 10, 50, 50)) e.Graphics.DrawString("A1", New Font("Arial", 12), New SolidBrush(Color.Blue), 112, 25) Else If ComboBox1.Text = P2 & ComboBox2.Text = T2 & ComboBox3.Text = A2 Then e.Graphics.DrawEllipse(New Pen(Color.DarkCyan), New Rectangle(10, 10, 50, 50)) e.Graphics.DrawString("P2", New Font("Arial", 12), New SolidBrush(Color.Blue), 23, 25) e.Graphics.DrawLine(New Pen(Color.DarkMagenta), New Point(60, 35), New Point(100, 35)) e.Graphics.DrawString("T2", New Font("Arial", 12), New SolidBrush(Color.Blue), 67, 12) e.Graphics.FillRectangle(New SolidBrush(Color.Red), 77, 30, 2, 10) e.Graphics.DrawEllipse(New Pen(Color.DarkCyan), New Rectangle(100, 10, 50, 50)) e.Graphics.DrawString("A2", New Font("Arial", 12), New SolidBrush(Color.Blue), 112, 25) End If End If End Sub End Class
il ya un erreur dans ce ligne ( If ComboBox1.Text = "P1" & ComboBox2.Text = "T1" & ComboBox3.Text = "A1" ) l'erreur est:
Conversion from string "T1" to type 'Boolean' is not valid.
je ne sais pas comment utilise le boucle if en vb
Aidez-moi SVP pour corriger cette erreur
A voir également:
- Comment réaliser un RDP
- Réaliser un organigramme - Guide
- Réaliser un camembert graphique - Guide
- Comment réaliser un graphique sur excel - Guide
- Réaliser un sommaire sur word - Guide
- Comment réaliser un tableau croisé dynamique - Guide