Guidance
指路人
g.yi.org
software / rapidq / Examples / String & Text / Encryption / encoding.rqb

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     DECLARE SUB enc_dec

     CREATE Form AS QFORM
      CAPTION = "Form1"
      Width = 335
      Height = 243
      Center
      CREATE Button1 AS QBUTTON
       CAPTION = "Encode / Decode"
       Left = 82
       Top = 170
       Width = 147
       onclick = enc_dec
      END CREATE
      CREATE RichEdit1 AS QRICHEDIT
       Left = 19
       Top = 12
       Width = 265
       Height = 137
       TabOrder = 1
       plaintext = 1      'very important
      END CREATE
     END CREATE

     Form.SHOWMODAL



     SUB enc_dec
      DIM x AS INTEGER
      DIM newstring AS STRING
      Richedit1.loadfromfile "textfile.txt"
      newstring = Richedit1.text
      FOR x = 1 TO LEN(newstring)
       newstring = REPLACE$(newstring, (CHR$(256 - ASC(MID$(newstring, x, 1)))), x)
      NEXT x
      Richedit1.text = newstring
      Richedit1.savetofile "textfile.txt"
     END SUB

掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-4-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-06-09 16:48:38