www.pudn.com > kelon.rar > Form2.frm


VERSION 5.00 
Begin VB.Form fShowSet  
   Caption         =   "界面属性对话框" 
   ClientHeight    =   3000 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   5130 
   BeginProperty Font  
      Name            =   "宋体" 
      Size            =   10.5 
      Charset         =   0 
      Weight          =   400 
      Underline       =   0   'False 
      Italic          =   0   'False 
      Strikethrough   =   0   'False 
   EndProperty 
   Icon            =   "Form2.frx":0000 
   LinkTopic       =   "Form2" 
   ScaleHeight     =   3000 
   ScaleWidth      =   5130 
   Begin VB.PictureBox Picture2  
      BorderStyle     =   0  'None 
      Height          =   255 
      Left            =   3180 
      ScaleHeight     =   255 
      ScaleWidth      =   255 
      TabIndex        =   18 
      Top             =   2475 
      Width           =   255 
   End 
   Begin VB.PictureBox Picture1  
      BorderStyle     =   0  'None 
      Height          =   240 
      Left            =   3135 
      ScaleHeight     =   240 
      ScaleWidth      =   255 
      TabIndex        =   17 
      Top             =   1500 
      Width           =   255 
   End 
   Begin VB.VScrollBar VScroll1  
      Height          =   720 
      Left            =   3135 
      Max             =   1000 
      Min             =   -1000 
      TabIndex        =   16 
      Top             =   1260 
      Width           =   255 
   End 
   Begin VB.HScrollBar HScroll1  
      Height          =   255 
      Left            =   2895 
      Max             =   1000 
      Min             =   -1000 
      TabIndex        =   15 
      Top             =   1515 
      Width           =   735 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "返回" 
      Height          =   390 
      Index           =   2 
      Left            =   3900 
      TabIndex        =   14 
      Top             =   1140 
      Width           =   1020 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "保存" 
      Height          =   390 
      Index           =   1 
      Left            =   3900 
      TabIndex        =   13 
      Top             =   510 
      Width           =   1020 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "应用" 
      Height          =   390 
      Index           =   0 
      Left            =   3900 
      TabIndex        =   12 
      Top             =   90 
      Visible         =   0   'False 
      Width           =   1020 
   End 
   Begin VB.TextBox Text1  
      Height          =   315 
      Index           =   5 
      Left            =   1680 
      TabIndex        =   11 
      Text            =   "Text1" 
      Top             =   2565 
      Width           =   1065 
   End 
   Begin VB.TextBox Text1  
      Height          =   315 
      Index           =   4 
      Left            =   1680 
      TabIndex        =   9 
      Text            =   "Text1" 
      Top             =   2205 
      Width           =   1065 
   End 
   Begin VB.TextBox Text1  
      Height          =   315 
      Index           =   3 
      Left            =   1680 
      TabIndex        =   8 
      Text            =   "Text1" 
      Top             =   1680 
      Width           =   1065 
   End 
   Begin VB.TextBox Text1  
      Height          =   315 
      Index           =   2 
      Left            =   1680 
      TabIndex        =   7 
      Text            =   "Text1" 
      Top             =   1335 
      Width           =   1065 
   End 
   Begin VB.TextBox Text1  
      Height          =   315 
      Index           =   1 
      Left            =   1680 
      TabIndex        =   6 
      Text            =   "Text1" 
      Top             =   855 
      Width           =   1065 
   End 
   Begin VB.TextBox Text1  
      Height          =   315 
      Index           =   0 
      Left            =   1680 
      TabIndex        =   5 
      Text            =   "Text1" 
      Top             =   435 
      Width           =   1065 
   End 
   Begin VB.VScrollBar VScroll2  
      Height          =   720 
      Left            =   3180 
      Max             =   1000 
      Min             =   -1000 
      TabIndex        =   19 
      Top             =   2235 
      Width           =   255 
   End 
   Begin VB.HScrollBar HScroll2  
      Height          =   255 
      Left            =   2940 
      Max             =   1000 
      Min             =   -1000 
      TabIndex        =   20 
      Top             =   2490 
      Width           =   735 
   End 
   Begin VB.Label labCol  
      Caption         =   "labCol" 
      Height          =   240 
      Left            =   1680 
      TabIndex        =   22 
      Top             =   105 
      Width           =   765 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "列距" 
      Height          =   210 
      Index           =   6 
      Left            =   390 
      TabIndex        =   21 
      Top             =   502 
      Width           =   420 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "列(Col)" 
      Height          =   210 
      Index           =   5 
      Left            =   390 
      TabIndex        =   10 
      Top             =   90 
      Width           =   735 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "高(Hight)" 
      Height          =   210 
      Index           =   4 
      Left            =   390 
      TabIndex        =   4 
      Top             =   2625 
      Width           =   945 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "宽(Width)" 
      Height          =   210 
      Index           =   3 
      Left            =   390 
      TabIndex        =   3 
      Top             =   2265 
      Width           =   945 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "上(Top)" 
      Height          =   210 
      Index           =   2 
      Left            =   390 
      TabIndex        =   2 
      Top             =   1738 
      Width           =   735 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "左(Left)" 
      Height          =   210 
      Index           =   1 
      Left            =   390 
      TabIndex        =   1 
      Top             =   1395 
      Width           =   840 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      BackStyle       =   0  'Transparent 
      Caption         =   "行距" 
      Height          =   210 
      Index           =   0 
      Left            =   390 
      TabIndex        =   0 
      Top             =   914 
      Width           =   420 
   End 
End 
Attribute VB_Name = "fShowSet" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
'位置: 2 
Private Sub Command1_Click(Index As Integer) 
    Select Case Index 
    Case 0 
    Case 1 ' 保存 
        Dim sVal As String 
        Dim sKey As String 
        sKey = "Showsta" 
        sVal = Text1(1).Text + "," 
        sVal = sVal + Text1(5).Text + "," 
        Call WritePrivateProfileString("ShowSet", sKey, sVal, App.Path + "\res\lz_kl_show.ini") 
        sVal = Text1(0).Text + "," 
        sVal = sVal + Text1(1).Text + "," 
        sVal = sVal + Text1(2).Text + "," 
        sVal = sVal + Text1(3).Text + "," 
        sVal = sVal + Text1(4).Text + "," 
        sVal = sVal + Text1(5).Text + ",?,?" 
        sKey = "ShowLoc" + Format(labCol.Caption, "00") 
        Call WritePrivateProfileString("ShowSet", sKey, sVal, App.Path + "\res\lz_kl_show.ini") 
        Call fShow.SetCoverOcx(False) 
    Case 2 
        Unload Me 
    End Select 
End Sub 
 
Private Sub Form_Load() 
    Call GetIniFileName 
    With myLabel 
        labCol = .CurrCol 
        Text1(0).Text = .colDist 
        Text1(1).Text = .RowWidth 
        Text1(2).Text = .Left 
        Text1(3).Text = .Top 
        Text1(4).Text = .Width 
        Text1(5).Text = .Height 
    End With 
    Call SetobjLoc(Me, 2) 
End Sub 
Private Sub priMove(ByVal nMode As Long) 
    Dim I As Long 
    Dim k As Long: k = 15 
    Dim c As Long 
    c = myLabel.Cols * myLabel.Rows - 1 
    Select Case nMode 
    Case 0 '左 << 
        Text1(2).Text = Text1(2).Text - k 
        For I = 0 To myLabel.Rows - 1 
            fShow.Label1(myLabel.CurrCol - 1 + I * myLabel.Cols).Left = Text1(2).Text 
        Next 
    Case 1 '右 >> 
        Text1(2).Text = Text1(2).Text + k 
        For I = 0 To myLabel.Rows - 1 
            fShow.Label1(myLabel.CurrCol - 1 + I * myLabel.Cols).Left = Text1(2).Text 
        Next 
    Case 2 '上 top 
        Text1(3).Text = Text1(3).Text - k 
        For I = 0 To c 
            fShow.Label1(I).Top = fShow.Label1(I).Top - k 
        Next 
    Case 3 '下 top 
        Text1(3).Text = Text1(3).Text + k 
        For I = 0 To c 
            fShow.Label1(I).Top = fShow.Label1(I).Top + k 
        Next 
    Case 4 '加长 
        Text1(4).Text = Text1(4).Text + k 
        For I = 0 To myLabel.Rows - 1 
            fShow.Label1(myLabel.CurrCol - 1 + I * myLabel.Cols).Width = Text1(4).Text 
        Next 
    Case 5 '缩短 
        Text1(4).Text = Text1(4).Text - k 
        For I = 0 To myLabel.Rows - 1 
            fShow.Label1(myLabel.CurrCol - 1 + I * myLabel.Cols).Width = Text1(4).Text 
        Next 
    Case 6 '高 height 
        Text1(5).Text = Text1(5).Text + k 
        For I = 0 To c 
            fShow.Label1(I).Height = Text1(5).Text 
        Next 
    Case 7 '矮 height 
        Text1(5).Text = Text1(5).Text - k 
        For I = 0 To c 
            fShow.Label1(I).Height = Text1(5).Text 
        Next 
    End Select 
End Sub 
 
Private Sub Form_Unload(Cancel As Integer) 
    Call SaveobjLoc(Me, 2) 
End Sub 
 
Private Sub HScroll1_Change() 
    Static l As Long 
    If l > HScroll1.Value Then '原值>现值, 减少, 
        Call priMove(0) 
    Else 
        Call priMove(1) 
    End If 
    l = HScroll1.Value 
End Sub 
Private Sub HScroll2_Change() 
    Static l As Long 
    If l > HScroll2.Value Then '原值>现值, 减少, 
        Call priMove(5) 
    Else 
        Call priMove(4) 
    End If 
    l = HScroll2.Value 
End Sub 
 
Private Sub VScroll1_Change() 
    Static l As Long 
    If l > VScroll1.Value Then '原值>现值, 减少, 
        Call priMove(2) 
    Else 
        Call priMove(3) 
    End If 
    l = VScroll1.Value 
End Sub 
Private Sub VScroll2_Change() 
    Static l As Long 
    If l > VScroll2.Value Then '原值>现值, 减少, 
        Call priMove(7) 
    Else 
        Call priMove(6) 
    End If 
    l = VScroll2.Value 
End Sub