begin process at 2012 02 14 13:24:19
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive Visual Basic & VB.NET

 > 

Archives Visual Basic

 > 

J'AI BESOIN D'AIDE !!!! :)

 > 

Besoin d'aide pour un programme simple...


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

Besoin d'aide pour un programme simple...

samedi 11 mai 2002 à 20:12:33 | Besoin d'aide pour un programme simple...

Ghis

Je doit faire un petit programme en Visual Basic et j'ai vraiment de la difficuleté. Voici le problème:

Write a program... that inputs lines of text and uses function InStr to determine the total number of occurences of each letter of the alphabet in the text. Uppercase (Majuscule) and lowercase (Minuscule) should be countered together. Store the totals for each letter in an array (Tableau), and display the values in tabular format after the totals have been deternined.

Sortie: Les statistiques provenant du tableau sont imprimées sur papier (Imprimante).

Voici le code que j'ai présentement:

Option Explicit
Dim mNbreLettreRetrouve(25) As Long
Dim mLettreRecherche(25) As String

Private Sub cmdQuitter_Click()
End
End Sub

Private Sub cmdRecherche_Click()
Dim intCompteur As Integer
Dim intIndice As Integer
Dim intRecherche As Integer
Dim intDebutRecherche As Integer
Dim strLettreRecherche As String
Dim intNombreRecherche As Integer

intDebutRecherche = 1

For intNombreRecherche = 0 To 25
Do Until intIndice = Len(txtTexte.Text)
intRecherche = InStr(intDebutRecherche, txtTexte.Text, mLettreRecherche(intNombreRecherche), vbTextCompare)

If intRecherche <> 0 Then
intDebutRecherche = intRecherche + 1
intCompteur = intCompteur + 1
End If

intIndice = intIndice + 1
Loop
mNbreLettreRetrouve(intIndice - 1) = intCompteur
Next intNombreRecherche
End Sub

Private Sub Form_Load()
mLettreRecherche(0) = "A"
mLettreRecherche(1) = "B"
mLettreRecherche(2) = "C"
mLettreRecherche(3) = "D"
mLettreRecherche(4) = "E"
mLettreRecherche(5) = "F"
mLettreRecherche(6) = "G"
mLettreRecherche(7) = "H"
mLettreRecherche(8) = "I"
mLettreRecherche(9) = "J"
mLettreRecherche(10) = "K"
mLettreRecherche(11) = "L"
mLettreRecherche(12) = "M"
mLettreRecherche(13) = "N"
mLettreRecherche(14) = "O"
mLettreRecherche(15) = "P"
mLettreRecherche(16) = "Q"
mLettreRecherche(17) = "R"
mLettreRecherche(18) = "S"
mLettreRecherche(19) = "T"
mLettreRecherche(20) = "U"
mLettreRecherche(21) = "V"
mLettreRecherche(22) = "W"
mLettreRecherche(23) = "X"
mLettreRecherche(24) = "Y"
mLettreRecherche(25) = "Z"

End Sub

Private Sub txtTexte_Change()
If Not txtTexte.Text = "" Then
cmdRecherche.Enabled = True
End If
End Sub


Que dois-je faire pour répondre aux exigences???

Merci d'Avance!!!


Cette discussion est classée dans : text, end, integer, mlettrerecherche, intindice


Répondre à ce message

Sujets en rapport avec ce message

Besoin d'aide pour un programme simple... [ par Ghis ] Je doit faire un petit programme en Visual Basic et j'ai vraiment de la difficuleté. Voici le problème:Write a program... that inputs lines of text an Loop [ par Michele ] Bonjourj'essaie d'éffectuer plusieurs boucles les unes derriere les autres, mais avec le code qui se trouve ci-dessous la premiere s'effectue bien mai Désactiver TAB dans (rich) TextBox [ par Dorgendubal ] Pour tous ceux qui, comme moi, ont cherché comment éviter de perdre le Focus lorsque l'on presse TAB dans une TextBox, voilà la solution que j'ai trou Besoin d'aide et vite si possible !!! [ par CaptainChoc ] Voilà le code source, jessaye d'enregistrer le picture3 (voir source) car quand je fait savepicture, il bug. Merci d'avanceil necessite 3 picture box Pb tt bete d'ajout et de suppression d'enregistrement [ par Praz ] Voilà kan je veux ajouter ou supprimer un enregistrement il me renvoir l'erreur 3027 me disant ke ma base est en lecture seule alors ke ce n'est pas l besoin d'aide!!!!! [ par Crazyblinkgirl ] Salut!Pourrait on me dire comment faire pour permettre la saisie de plusieurs caracteres text avec une telle procédure? En effet, je ne peux en taper Loop [ par Michele ] BonjourJe voudrais effectuer une boucle du genre:Dim Somme As IntegerIf Option4.Value = True Then With RSDo While Not RS.EOF Somme = RS! Somme RS! So loop [ par Michele ] BonjourJe voudrais effectuer une boucle du genre:Dim Somme As IntegerIf Option4.Value = True ThenWith RSDo While Not RS.EOFSomme = RS! SommeRS! Somme Sélectionner le Text d'un TextBox [ par MadJoker ] Comment sélectionner le contenu d'un TextBox qui reçoit le focus ??? Je croyais que ceci fonctionnerait ????? ;-/---------------------------------- Gestion Rtf (facil et urgent)plz [ par Rastacana ] Bon alors j ai un fichier text ke je plasse dans une string temp.temp je le bascule ds ma Rich text box alias rtfEt je fait mon traitement sur le rtf


Nos sponsors


Sondage...

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

Photothèque

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 1,435 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales