begin process at 2010 02 10 16:03:10
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Texte

 > TRAITEMENT DE TEXTE DE BASE

TRAITEMENT DE TEXTE DE BASE


 Information sur la source

Note :
3 / 10 - par 2 personnes
3,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Texte Classé sous :traitement, texte Niveau :Débutant Date de création :14/01/2002 Date de mise à jour :15/01/2002 22:00:04 Vu / téléchargé :2 798 / 258

Auteur : DolfinCry

Ecrire un message privé
Commentaire sur cette source (4)
Ajouter un commentaire et/ou une note

 Description

C'est pas compliquer, Y sert a ecrire mais aussi de changer le background, la couleur du texte, de faire des recherche, etc...

Source

  • Option Explicit
  • Dim strrechercher As String
  • Private Sub mnuArrierePlan_Click()
  • CommonDialog1.ShowColor
  • txtedition.BackColor = CommonDialog1.Color
  • End Sub
  • Private Sub mnucaractere_Click()
  • CommonDialog1.ShowColor
  • txtedition.ForeColor = CommonDialog1.Color
  • End Sub
  • Private Sub mnuchoix_Click()
  • CommonDialog1.Flags = cdlCFScreenFonts
  • CommonDialog1.FontName = txtedition.FontName
  • CommonDialog1.FontBold = txtedition.FontBold
  • CommonDialog1.FontItalic = txtedition.FontItalic
  • CommonDialog1.FontSize = txtedition.FontSize
  • CommonDialog1.ShowFont
  • txtedition.FontName = CommonDialog1.FontName
  • txtedition.FontBold = CommonDialog1.FontBold
  • txtedition.FontItalic = CommonDialog1.FontItalic
  • txtedition.FontSize = CommonDialog1.FontSize
  • End Sub
  • Private Sub mnucoller_Click()
  • txtedition.SelText = Clipboard.GetText()
  • End Sub
  • Private Sub mnucopier_Click()
  • Clipboard.Clear
  • Clipboard.SetText txtedition.SelText
  • End Sub
  • Private Sub mnucouper_Click()
  • Clipboard.Clear
  • Clipboard.SetText txtedition.SelText
  • txtedition.SelText = ""
  • End Sub
  • Private Sub mnuedition_Click()
  • '** aucun texte sélectionné
  • If txtedition.SelText = "" Then
  • mnucouper.Enabled = False
  • mnucopier.Enabled = False
  • Else
  • mnucouper.Enabled = True
  • mnucopier.Enabled = True
  • End If
  • ' si aucun texte dans le presse-papier
  • If Clipboard.GetText = "" Then
  • mnucoller.Enabled = False
  • Else
  • mnucoller.Enabled = True
  • End If
  • End Sub
  • Private Sub mnunouveau_Click()
  • Call mnusauve_sous_Click
  • End Sub
  • Private Sub mnuouvrir_Click()
  • Dim line As String
  • CommonDialog1.Filter = "Fichier texte(*.txt) | *.txt | Tout les fichiers (*.*) | *.*"
  • CommonDialog1.FileName = ""
  • CommonDialog1.ShowOpen
  • Open CommonDialog1.FileName For Input As #1
  • Do Until EOF(1)
  • Input #1, line
  • txtedition.Text = txtedition.Text & line & Chr(13) & Chr(10)
  • Loop
  • Close #1
  • End Sub
  • Private Sub mnuquitter_Click()
  • End
  • End Sub
  • Private Sub mnusauve_Click()
  • Call mnusauve_sous_Click
  • End Sub
  • Private Sub mnusauve_sous_Click()
  • CommonDialog1.Filter = "Fichier texte(*.txt) | *.txt | Tout les fichiers (*.*) | *.*"
  • CommonDialog1.FileName = ""
  • CommonDialog1.ShowSave
  • If CommonDialog1.FileName = "" Then
  • Exit Sub
  • End If
  • Open CommonDialog1.FileName For Output As #1
  • Print #1, txtedition.Text
  • Close #1
  • End Sub
  • Private Sub mnusearch_Click()
  • Dim intValRenvoi As Integer
  • Dim intPositionTrouver As Integer
  • '
  • ' **Demande le texte recherché
  • '
  • strrechercher = InputBox("Rechercher: ", "RECHERCHER")
  • '
  • ' Rechercher le texte
  • '
  • intPositionTrouver = InStr(1, txtedition.Text, strrechercher, 1)
  • If intPositionTrouver = 0 Then
  • MsgBox "Recherche Infructueuse"
  • Else
  • '
  • 'Texte Retrouvé
  • 'Mettre le texte en surbrillance
  • '
  • txtedition.SelStart = intPositionTrouver - 1
  • txtedition.SelLength = Len(strrechercher)
  • End If
  • End Sub
  • Private Sub mnusuivant_Click()
  • Dim intPositionDebut As Integer
  • Dim intPositionTrouver As Integer
  • intPositionDebut = txtedition.SelStart + 2
  • intPositionTrouver = InStr(intPositionDebut, txtedition.Text, strrechercher, 1)
  • If intPositionTrouver = 0 Then
  • MsgBox "La Recherche est Terminée"
  • Else
  • '
  • 'Texte Retrouvé
  • 'Mettre le texte en surbrillance
  • '
  • txtedition.SelStart = intPositionTrouver - 1
  • txtedition.SelLength = Len(strrechercher)
  • End If
  • End Sub
Option Explicit
Dim strrechercher As String

Private Sub mnuArrierePlan_Click()
    CommonDialog1.ShowColor
    txtedition.BackColor = CommonDialog1.Color
End Sub

Private Sub mnucaractere_Click()
    CommonDialog1.ShowColor
    txtedition.ForeColor = CommonDialog1.Color
End Sub

Private Sub mnuchoix_Click()
    CommonDialog1.Flags = cdlCFScreenFonts
    CommonDialog1.FontName = txtedition.FontName
    CommonDialog1.FontBold = txtedition.FontBold
    CommonDialog1.FontItalic = txtedition.FontItalic
    CommonDialog1.FontSize = txtedition.FontSize
    
    CommonDialog1.ShowFont
    
    txtedition.FontName = CommonDialog1.FontName
    txtedition.FontBold = CommonDialog1.FontBold
    txtedition.FontItalic = CommonDialog1.FontItalic
    txtedition.FontSize = CommonDialog1.FontSize
End Sub

Private Sub mnucoller_Click()
    txtedition.SelText = Clipboard.GetText()
End Sub

Private Sub mnucopier_Click()
    Clipboard.Clear
    Clipboard.SetText txtedition.SelText
End Sub

Private Sub mnucouper_Click()
    Clipboard.Clear
    Clipboard.SetText txtedition.SelText
    txtedition.SelText = ""
End Sub

Private Sub mnuedition_Click()
    '** aucun texte sélectionné
    If txtedition.SelText = "" Then
        mnucouper.Enabled = False
        mnucopier.Enabled = False
    Else
        mnucouper.Enabled = True
        mnucopier.Enabled = True
    End If
    
    ' si aucun texte dans le presse-papier
    If Clipboard.GetText = "" Then
        mnucoller.Enabled = False
    Else
        mnucoller.Enabled = True
    End If
    
End Sub

Private Sub mnunouveau_Click()
    Call mnusauve_sous_Click
End Sub

Private Sub mnuouvrir_Click()
    Dim line As String
    CommonDialog1.Filter = "Fichier texte(*.txt) | *.txt | Tout les fichiers (*.*) | *.*"
    CommonDialog1.FileName = ""
    
    CommonDialog1.ShowOpen
    
    Open CommonDialog1.FileName For Input As #1
    Do Until EOF(1)
        Input #1, line
        txtedition.Text = txtedition.Text & line & Chr(13) & Chr(10)
    Loop
    Close #1
    
End Sub

Private Sub mnuquitter_Click()
    End
End Sub

Private Sub mnusauve_Click()
    Call mnusauve_sous_Click
End Sub

Private Sub mnusauve_sous_Click()
    CommonDialog1.Filter = "Fichier texte(*.txt) | *.txt | Tout les fichiers (*.*) | *.*"
    CommonDialog1.FileName = ""
    CommonDialog1.ShowSave
    If CommonDialog1.FileName = "" Then
        Exit Sub
    End If
    
    Open CommonDialog1.FileName For Output As #1
    Print #1, txtedition.Text
    Close #1
    
End Sub

Private Sub mnusearch_Click()
    Dim intValRenvoi As Integer
    Dim intPositionTrouver As Integer
    '
    '   **Demande le texte recherché
    '
    strrechercher = InputBox("Rechercher: ", "RECHERCHER")
    '
    '   Rechercher le texte
    '
    intPositionTrouver = InStr(1, txtedition.Text, strrechercher, 1)
    If intPositionTrouver = 0 Then
        MsgBox "Recherche Infructueuse"
    Else
        '
        'Texte Retrouvé
        'Mettre le texte en surbrillance
        '
        txtedition.SelStart = intPositionTrouver - 1
        txtedition.SelLength = Len(strrechercher)
    End If
End Sub

Private Sub mnusuivant_Click()
    Dim intPositionDebut As Integer
    Dim intPositionTrouver As Integer
    
    intPositionDebut = txtedition.SelStart + 2
    intPositionTrouver = InStr(intPositionDebut, txtedition.Text, strrechercher, 1)
    If intPositionTrouver = 0 Then
        MsgBox "La Recherche est Terminée"
    Else
       '
        'Texte Retrouvé
        'Mettre le texte en surbrillance
        '
        txtedition.SelStart = intPositionTrouver - 1
        txtedition.SelLength = Len(strrechercher)
    End If
End Sub
 

 Conclusion

C'est mon premier, soyer indulgent....   Faut bien commencer en quelque part hein?

 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Sources du même auteur

Source avec Zip JEUX DE ROULETTE DE CASINO

 Sources de la même categorie

Source avec Zip Source avec une capture AYOUBPAD2009 par ayoube2009
Source avec Zip Source avec une capture PILOTAGE D'AFFICHEURS LCD SUR PORT SÉRIE OU USB par mays
Source avec Zip Source avec une capture TRAITEMENT DE TEXTE RTF par zozo14
FORMATAGE D'UNE CELLULE EXCEL VIA UNE SYNTAXE HTML par 8Tnerolf8
Source avec Zip DÉFILEMENT TEXTE par mimiZanzan

 Sources en rapport avec celle ci

Source avec Zip Source .NET (Dotnet) TRAITEMENT DE TEXTE EN CRÉOLE par tmcode
Source avec Zip Source avec une capture LIVE (( TRAITEMENT DE TEXTE )) par crossblade
Source avec Zip TRATEMENT DE TEXTE + CODAGE par Thib
Source avec Zip Source avec une capture TEXT EDITOR par xalamar
Source avec Zip Source avec une capture AH VALA UN BON EDITEUR DE TEXTE : NODE EDITOR (PETITE MISE A... par Zeratul456

Commentaires et avis

Commentaire de config le 14/01/2002 11:55:21

"La Recherche est Terminer"... tu devrais ajouter un correcteur d'orthographe hahahaha (désolé)
je suppose ke c une erreur paske t'as tapé trop vite mais bon c'est "Terminée".
remarke vo mieux ça k'un code pourri comme ceux ke je pourrais mettre...

@+

Commentaire de FScorpion le 15/01/2002 00:06:33

Bien comme code.

Bon travail

Commentaire de Crazyht le 15/01/2002 01:12:08 administrateur CS

Si c'est réellement ton premier code VB alors je te felicite, Il est clair, commenté et en plus ça fonctionne correctement.

Toute mes félicitions.

A++
Hervé

Commentaire de DolfinCry le 15/01/2002 23:20:49

Pour ma part, je trouve pas que c'est vraiment bien commenter, je vais essayer de le modifier mais pour la faute d'ortographe, et bien elle, je l'ai réparée.  En passant, je suis pas très bon en francais, je le sais mais je fais des efforts.

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

Traitement de texte [ par Benj1105 ] Bonjour ! Serait-il possible de m' expliquer, comment rechercher une chaine de caractères dans un textbox, la surligner (selectionnée), et écrire comm Traitement de texte avec VB6 Pro [ par Mac2550 ] Salut,Je suis en train de développer un petit traitement de texte, genre bloc-note pour ensuite voir plus grand...Malheureusement un problème m'est ap Traitement fichier texte [ par jeromepol49 ] bonjour à tous,J'ai un fichier .txt rempli de données du genre:102022 KRYNAC 2865 F S7 KRYNAC 2865 F BAYE 1 OUIqui tient sur une lig Un traitement de texte similaire a celui de Microsoft Word [ par 3edbill69 ] Comment peut-on programmer une boite de texte ( ou un controle)  pour qu'elle puisse permettre des soulignement loufoque du genre : brisés ( Traitement dans un fichier texte(urgent) [ par limoun ] Salut tout le monde voici mon prob FICHIER1001;12/12/2004;12:00:00002;12/12/2004;13:00:00001;12/12/2004;12:10:00002;12/12/2004;13:10:00FICHIER212/12/2 Traitement de fichier texte [ par chronosdfs ] Bonjour, J'aurais voulu savoir comment on peu modifier une ligne dans un fichier texte. Par exemple uniquement la ligne 33 ! Je n'ai trouver aucune me pb pour logiciel de traitement de texte [ par Link02 ] J'ai un problème pour mon logiciel de traitement de texte!Voilà je voudrais pouvoir mettre mon texte en gras lorsque que je clique sur mon b Traitement de chaine [ par Just_Me ] Salut,voila en fait j'utilise un Richt TextBox  pour editer du texte (couleur, taille, gras, osulignement..)et de la je le convertis au format ht Traitement de fichiers image texte [ par phototexte ] Bonjour,  A partir de fichiers image texte, comment  lisser le contour des lettres qui habituellement ont des contours saccadées et des tons de gris v Traitement de texte gratuit compatible VB express [ par zam75 ] Salut à tous,je bosse actuellement sur un applicatif de gestion clientèle développé avec VB express.Je cherche un moyen de gérer toute la partie éditi


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
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 : 0,702 sec (4)

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