Morel convert ascii

Description

Convertisseur d'une chaine de caractère alphaNumérique en code ascii en deux clique maxi.
Les codes des différents caractères son séparés par des espaces.
Copier le code suivant dans un éditeur de texte et enregistrer le avec l'extansion *.frm.

Source / Exemple :


VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Morel Convert ASCII"
   ClientHeight    =   2496
   ClientLeft      =   36
   ClientTop       =   324
   ClientWidth     =   3744
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2496
   ScaleWidth      =   3744
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command3 
      Caption         =   "Effacer"
      Height          =   372
      Left            =   1200
      TabIndex        =   4
      Top             =   2040
      Width           =   1092
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Quitter"
      Height          =   372
      Left            =   2280
      TabIndex        =   3
      Top             =   2040
      Width           =   1092
   End
   Begin VB.CommandButton Command1 
      Caption         =   "convertir"
      Height          =   372
      Left            =   240
      TabIndex        =   2
      Top             =   2040
      Width           =   972
   End
   Begin VB.TextBox Text2 
      Height          =   1452
      Left            =   480
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   1
      Top             =   480
      Width           =   2412
   End
   Begin VB.TextBox Text1 
      Height          =   288
      Left            =   480
      TabIndex        =   0
      Top             =   120
      Width           =   2412
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text <> "" Then
    convert
Else
    MsgBox "Pas de texte !!"
End If
End Sub

Private Sub Command2_Click()
End
End Sub

Sub convert()
For x = 1 To Len(Text1.Text)
p = Mid(Text1.Text, x, 1)
Text2.Text = Text2.Text & "    " & Asc(p)
Next x
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
End Sub

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.