home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / str_plus / strman.frm < prev    next >
Text File  |  1994-07-19  |  4KB  |  148 lines

  1. VERSION 2.00
  2. Begin Form StrMan 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Manipulate Strings"
  6.    ClientHeight    =   3840
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1485
  9.    ClientWidth     =   5175
  10.    ControlBox      =   0   'False
  11.    Height          =   4245
  12.    Left            =   1035
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3840
  17.    ScaleWidth      =   5175
  18.    Top             =   1140
  19.    Width           =   5295
  20.    Begin TextBox Text1 
  21.       Height          =   285
  22.       Left            =   240
  23.       MaxLength       =   64
  24.       TabIndex        =   0
  25.       Text            =   "Text1"
  26.       Top             =   1080
  27.       Width           =   4695
  28.    End
  29.    Begin CommandButton CmdOkay 
  30.       BackColor       =   &H00C0C0C0&
  31.       Cancel          =   -1  'True
  32.       Caption         =   "O &K A Y"
  33.       Height          =   375
  34.       Left            =   2640
  35.       TabIndex        =   4
  36.       Top             =   3240
  37.       Width           =   2295
  38.    End
  39.    Begin CommandButton CmdEncrypt 
  40.       BackColor       =   &H00C0C0C0&
  41.       Caption         =   "&Encrypt"
  42.       Height          =   375
  43.       Left            =   2640
  44.       TabIndex        =   3
  45.       Top             =   2760
  46.       Width           =   2295
  47.    End
  48.    Begin CommandButton CmdReverseString 
  49.       BackColor       =   &H00C0C0C0&
  50.       Caption         =   "&ReverseString"
  51.       Height          =   375
  52.       Left            =   240
  53.       TabIndex        =   2
  54.       Top             =   3240
  55.       Width           =   2295
  56.    End
  57.    Begin CommandButton CmdToName 
  58.       BackColor       =   &H00C0C0C0&
  59.       Caption         =   "&ToName"
  60.       Height          =   375
  61.       Left            =   240
  62.       TabIndex        =   1
  63.       Top             =   2760
  64.       Width           =   2295
  65.    End
  66.    Begin Label Label3 
  67.       Alignment       =   2  'Center
  68.       BackStyle       =   0  'Transparent
  69.       Caption         =   "Label3"
  70.       ForeColor       =   &H00008000&
  71.       Height          =   255
  72.       Left            =   240
  73.       TabIndex        =   6
  74.       Top             =   1800
  75.       Width           =   4695
  76.    End
  77.    Begin Label Label2 
  78.       BorderStyle     =   1  'Fixed Single
  79.       Caption         =   "Label2"
  80.       Height          =   255
  81.       Left            =   240
  82.       TabIndex        =   7
  83.       Top             =   2160
  84.       Width           =   4695
  85.    End
  86.    Begin Label Label1 
  87.       Alignment       =   2  'Center
  88.       BackStyle       =   0  'Transparent
  89.       Caption         =   "Label1"
  90.       ForeColor       =   &H00000080&
  91.       Height          =   735
  92.       Left            =   240
  93.       TabIndex        =   5
  94.       Top             =   240
  95.       Width           =   4695
  96.    End
  97. End
  98. Sub CmdEncrypt_Click ()
  99.     test$ = Text1.Text
  100.     Encrypt test$, 5
  101.     label2.Caption = test$
  102. End Sub
  103.  
  104. Sub CmdOkay_Click ()
  105.     Unload Me
  106. End Sub
  107.  
  108. Sub CmdReverseString_Click ()
  109.     test$ = Text1.Text
  110.     ReverseString test$
  111.     label2.Caption = test$
  112. End Sub
  113.  
  114. Sub CmdToName_Click ()
  115.     test$ = Text1.Text
  116.     ToName test$
  117.     label2.Caption = test$
  118. End Sub
  119.  
  120. Sub Form_Load ()
  121.     FormCenterForm Me, DemoMain
  122.     nl$ = Chr$(13) + Chr$(10)
  123.     msg$ = "Enter a sample text string and then select" + nl$
  124.     msg$ = msg$ + "a command button to view the effect."
  125.     label1.Caption = msg$
  126.     label2.Caption = ""
  127.     msg$ = "The resultant effect:"
  128.     label3.Caption = msg$
  129.     Text1.Text = "Now is the time for all good men to"
  130.     Screen.MousePointer = 0
  131. End Sub
  132.  
  133. Sub Form_Paint ()
  134.     DoForm3D Me, sunken, 1, 5
  135. End Sub
  136.  
  137. Sub Text1_Change ()
  138.     If label2.Caption <> "" Then
  139.         label2.Caption = ""
  140.         End If
  141. End Sub
  142.  
  143. Sub Text1_GotFocus ()
  144.     Text1.SelStart = 0
  145.     Text1.SelLength = Len(Text1.Text)
  146. End Sub
  147.  
  148.