15.07.2013 Views

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

frmAssistant - 4<br />

cbo5.AddItem ("vocatif (v)")<br />

cbo6.Clear<br />

cbo6.AddItem ("masculin (m)")<br />

cbo6.AddItem ("féminin (f)")<br />

cbo6.AddItem ("neutre (n)")<br />

cbo7.Clear<br />

cbo7.AddItem ("singulier (s)")<br />

cbo7.AddItem ("pluriel (p)")<br />

End If<br />

End Sub<br />

Private Sub Command1_Click()<br />

Unload Me<br />

End Sub<br />

Public Sub Command2_Click()<br />

If vientde = "" And _<br />

recherche = "" Then<br />

GoTo suite:<br />

End If<br />

un = ""<br />

deux = ""<br />

trois = ""<br />

quatre = ""<br />

cinq = ""<br />

six = ""<br />

sept = ""<br />

'les codes particuliers correspondent à l'avant dernière lettre de chaque champs<br />

' exemple: "nom (n)" , code = n<br />

If cbo1.Text "" Then un = Mid(cbo1.Text, Len(cbo1.Text) - 1, 1)<br />

If cbo2.Text "" Then deux = Mid(cbo2.Text, Len(cbo2.Text) - 1, 1)<br />

If cbo3.Text "" Then trois = Mid(cbo3.Text, Len(cbo3.Text) - 1, 1)<br />

If cbo4.Text "" Then quatre = Mid(cbo4.Text, Len(cbo4.Text) - 1, 1)<br />

If cbo5.Text "" And Len(cbo5.Text) > 2 Then cinq = Mid(cbo5.Text, Len(cbo5.Text) - 1, 1)<br />

If cbo6.Text "" And Len(cbo6.Text) > 2 Then six = Mid(cbo6.Text, Len(cbo6.Text) - 1, 1)<br />

If cbo7.Text "" And Len(cbo7.Text) > 2 Then sept = Mid(cbo7.Text, Len(cbo7.Text) - 1, 1)<br />

'ceci correspond donc au nouveau code issus des modifications de l'utilisateur<br />

code = Trim(un & deux & trois & quatre & cinq & six & sept)<br />

' j'efface toute trace d'une recherche précédente<br />

Label1.Caption = ""<br />

txtcode.Text = code<br />

vientde = frmAnalyseMorphologique.lblvientde.Caption<br />

recherche = vientde & " (" & code & ")"<br />

txtRecherche.Text = recherche<br />

nveaucode = code<br />

suite:<br />

'je dois quant même récupérer le nveaucode<br />

If cbo1.Text "" Then un = Mid(cbo1.Text, Len(cbo1.Text) - 1, 1)<br />

If cbo2.Text "" Then deux = Mid(cbo2.Text, Len(cbo2.Text) - 1, 1)<br />

If cbo3.Text "" Then trois = Mid(cbo3.Text, Len(cbo3.Text) - 1, 1)<br />

If cbo4.Text "" Then quatre = Mid(cbo4.Text, Len(cbo4.Text) - 1, 1)<br />

If cbo5.Text "" And Len(cbo5.Text) > 2 Then cinq = Mid(cbo5.Text, Len(cbo5.Text) - 1, 1)<br />

If cbo6.Text "" And Len(cbo6.Text) > 2 Then six = Mid(cbo6.Text, Len(cbo6.Text) - 1, 1)<br />

If cbo7.Text "" And Len(cbo7.Text) > 2 Then sept = Mid(cbo7.Text, Len(cbo7.Text) - 1, 1)<br />

'ceci correspond donc au nouveau code issus des modifications de l'utilisateur<br />

code = Trim(un & deux & trois & quatre & cinq & six & sept)<br />

nveaucode = code<br />

recherche = frmAssistant.txtRecherche.Text & " (" & nveaucode & ")"<br />

Call RechercheMorphologique(recherche, nveaucode)<br />

lstPassages.Text = lstPassages.List(0)<br />

lstPassages_Click<br />

End Sub<br />

Private Sub Form_Load()<br />

autoexecut = False<br />

cbo1.AddItem ("nom (n)")<br />

cbo1.AddItem ("verbe (v)")<br />

cbo1.AddItem ("adjectif (a)")<br />

cbo1.AddItem ("pronom (r)")

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!