Hacker WarRock :: [tuto] Créer un bloc note
Hacker WarRock Forum Index
Hacker WarRock
Les meilleurs Hacks WarRock!!
 
Hacker WarRock Forum IndexFAQSearchRegisterLog in

:: [tuto] Créer un bloc note ::

 
Post new topic   Reply to topic    Hacker WarRock Forum Index -> Programmation -> Visual basic 2008
Previous topic :: Next topic  
Author Message
[Ṗяø] ◄Яɪɢнτ
Hacker Pro
Hacker Pro

Offline

Joined: 31 Jan 2010
Posts: 516
Système d'exploitation: Vista
Localisation: Vosges
Masculin Taureau (20avr-20mai)
LVL Warrock: lvl 34
Moyenne de points: 0.60

PostPosted: Tue 2 Nov 2010 - 07:01    Post subject: [tuto] Créer un bloc note Reply with quote

bonjour, cette fois-ci, je vais vous apprendre comment créer un bloc note.

Suivez Bien Les étape Suivants :


1) Ouvrir Microsoft Visual Basic 2008
2) Créer un nouveau document ( ctrl + n ), application windows form et, on donne le nom qu'on veut : Bloc Note ( exemple ).
3) On ajoute une RichTextBox et un MenuStrip à notre form.

4) On ajoute dans le menustrip :

Fichier, Édition, Format.

et dans fichier : Ouvrir, Enregistrer, Quitter
  Édition: Copier, Coller, Couper, Tout supprimer
Format : Police , Couleur

5) Lorsque ça a été fait, il suffit maintenant de rajouter les codes dans le bon emplacement :


 
Code:
Sur le bouton Tout éffacer :
 
 RichTextBox1.Clear()
 
 Ouvrir
 
 Try
 Dim dlg As OpenFileDialog = New OpenFileDialog
 dlg.Title = "Ouvrir"
 dlg.Filter = "Rich Text Files (*.rtf)|*.rtf"
 If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
 RichTextBox1.LoadFile(dlg.FileName)
 End If
 Catch ex As Exception : End Try
 
 Enregistrer
 
 Try
 Dim dlg As SaveFileDialog = New SaveFileDialog
 dlg.Title = "Enregistré"
 dlg.Filter = "Rich Text Files (*.rtf)|*.rtf"
 If dlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
 RichTextBox1.SaveFile(dlg.FileName, RichTextBoxStreamType.RichText)
 End If
 Catch ex As Exception : End Try
 
 Couper
 
 RichTextBox1.Cut()
 
 Copier
 
 RichTextBox1.Copy()
 
 Coller
 
 RichTextBox1.Paste()
 
 Selectionner tout
 
 RichTextBox1.SelectAll()
 
 Police
 
 Try
 Dim dlg As FontDialog = New FontDialog
 dlg.Font = RichTextBox1.Font
 If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
 RichTextBox1.Font = dlg.Font
 End If
 Catch ex As Exception : End Try
 
 
 Couleur
 
 
 Try
 Dim dlg As ColorDialog = New ColorDialog
 dlg.Color = RichTextBox1.ForeColor
 If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then
 RichTextBox1.ForeColor = dlg.Color
 End If
 Catch ex As Exception : End Try

 

 
 


Back to top
Visit poster’s website
█ FЯAИCEKIL █
Hacker Pro
Hacker Pro

Offline

Joined: 25 Aug 2010
Posts: 598
Système d'exploitation: Seven
Localisation: France - Alsace - 68
Masculin Cancer (21juin-23juil)
LVL Warrock: lvl 57
Moyenne de points: 1.02

PostPosted: Wed 15 Dec 2010 - 14:16    Post subject: [tuto] Créer un bloc note Reply with quote

mouai pas mal mais pas trop besoin ^^
_________________



Back to top
MSN Skype
Display posts from previous:   
Post new topic   Reply to topic    Hacker WarRock Forum Index -> Programmation -> Visual basic 2008 All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  

Index | Create a forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation

© Hacker-WarRock © 2009 - 2012
Powered by WeWeWe13 & Himka