www.pudn.com > 2006021801.zip > Form1.frm


VERSION 5.00 
Begin VB.Form Form1  
   Caption         =   "Form1" 
   ClientHeight    =   1575 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   3360 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   1575 
   ScaleWidth      =   3360 
   StartUpPosition =   3  '窗口缺省 
   Begin VB.CommandButton Command2  
      Caption         =   "读出" 
      Height          =   375 
      Left            =   1800 
      TabIndex        =   2 
      Top             =   960 
      Width           =   855 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "写入" 
      Height          =   375 
      Left            =   480 
      TabIndex        =   1 
      Top             =   960 
      Width           =   975 
   End 
   Begin VB.TextBox txtShare  
      Height          =   375 
      Left            =   240 
      TabIndex        =   0 
      Text            =   "Text1" 
      Top             =   480 
      Width           =   2895 
   End 
   Begin VB.Label Label1  
      Caption         =   "要观察效果,请再起动一个实例" 
      Height          =   255 
      Left            =   240 
      TabIndex        =   3 
      Top             =   240 
      Width           =   2775 
   End 
End 
Attribute VB_Name = "Form1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private strShare As New CSharedString 
Private Sub Command1_Click() 
    strShare = txtShare 
End Sub 
 
 
Private Sub Command2_Click() 
    txtShare = strShare 
End Sub 
 
Private Sub Form_Load() 
    strShare.Create "TestShareString" 
    If strShare = sEmpty Then 
        strShare = "AdamBear1" 
    End If 
    txtShare = strShare 
End Sub