www.pudn.com > textmanager.rar > FrmMainback.frm, change:2005-04-12,size:6269b


VERSION 5.00 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Begin VB.Form FrmMain  
   Caption         =   "Form1" 
   ClientHeight    =   6810 
   ClientLeft      =   60 
   ClientTop       =   345 
   ClientWidth     =   8820 
   LinkTopic       =   "Form1" 
   LockControls    =   -1  'True 
   ScaleHeight     =   6810 
   ScaleWidth      =   8820 
   StartUpPosition =   3  'ȱʡ 
   WindowState     =   2  'Maximized 
   Begin MSComctlLib.StatusBar StatusBar1  
      Align           =   2  'Align Bottom 
      Height          =   360 
      Left            =   0 
      TabIndex        =   4 
      Top             =   6450 
      Width           =   8820 
      _ExtentX        =   15558 
      _ExtentY        =   635 
      _Version        =   393216 
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}  
         NumPanels       =   1 
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}  
         EndProperty 
      EndProperty 
   End 
   Begin VB.PictureBox picSplitter  
      BackColor       =   &H8000000C& 
      BorderStyle     =   0  'None 
      Height          =   6645 
      Left            =   5460 
      MousePointer    =   9  'Size W E 
      ScaleHeight     =   6645 
      ScaleWidth      =   45 
      TabIndex        =   3 
      Top             =   1275 
      Visible         =   0   'False 
      Width           =   45 
   End 
   Begin MSComctlLib.ListView LVCaoZuo  
      Height          =   6645 
      Left            =   4020 
      TabIndex        =   2 
      Top             =   1275 
      Width           =   7740 
      _ExtentX        =   13653 
      _ExtentY        =   11721 
      Arrange         =   2 
      LabelEdit       =   1 
      LabelWrap       =   -1  'True 
      HideSelection   =   -1  'True 
      HideColumnHeaders=   -1  'True 
      OLEDragMode     =   1 
      _Version        =   393217 
      Icons           =   "ImageList1" 
      SmallIcons      =   "ImageList1" 
      ColHdrIcons     =   "ImageList1" 
      ForeColor       =   -2147483640 
      BackColor       =   -2147483643 
      BorderStyle     =   1 
      Appearance      =   1 
      OLEDragMode     =   1 
      NumItems        =   0 
   End 
   Begin VB.PictureBox PicShow  
      BackColor       =   &H8000000E& 
      Height          =   6600 
      Left            =   60 
      ScaleHeight     =   6540 
      ScaleWidth      =   3825 
      TabIndex        =   1 
      Top             =   1290 
      Width           =   3885 
   End 
   Begin VB.Frame Frame1  
      BorderStyle     =   0  'None 
      Height          =   1470 
      Left            =   60 
      TabIndex        =   0 
      Top             =   -255 
      Width           =   8160 
      Begin MSComctlLib.ImageList ImageList1  
         Left            =   2175 
         Top             =   990 
         _ExtentX        =   1005 
         _ExtentY        =   1005 
         BackColor       =   -2147483643 
         ImageWidth      =   48 
         ImageHeight     =   48 
         MaskColor       =   12632256 
         _Version        =   393216 
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}  
            NumListImages   =   2 
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}  
               Picture         =   "FrmMainback.frx":0000 
               Key             =   "open" 
            EndProperty 
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}  
               Picture         =   "FrmMainback.frx":107A0 
               Key             =   "close" 
            EndProperty 
         EndProperty 
      End 
   End 
   Begin VB.Image imgSplitter  
      Height          =   6630 
      Left            =   3945 
      MouseIcon       =   "FrmMainback.frx":108F8 
      MousePointer    =   99  'Custom 
      Top             =   1290 
      Width           =   90 
   End 
End 
Attribute VB_Name = "FrmMain" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
 
Const NAME_COLUMN = 0 
Const TYPE_COLUMN = 1 
Const SIZE_COLUMN = 2 
Const DATE_COLUMN = 3 
 
Dim mbMoving As Boolean 
Const sglSplitLimit = 500 
 
 
 
Private Sub Form_Load() 
  'LVCaoZuo.ColumnHeaders.Add 1, "yes", "guanlu", 100, , "open" 
    LVCaoZuo.ListItems.Add 1, "ok3" 
   LVCaoZuo.ListItems.Add 2, "ok13" 
     LVCaoZuo.ListItems.Add 3, "ok4" 
   LVCaoZuo.ListItems.Add 4, "ok41" 
     LVCaoZuo.ListItems.Add 5, "ok43" 
       
  LVCaoZuo.ListItems.Add 6, "ok", "ce shi", "open", "open" 
   LVCaoZuo.ListItems.Add 7, "ok1", "ce shi", "open", "open" 
   
End Sub 
 
Private Sub Form_Resize() 
 Frame1.Left = 0 
 Frame1.Top = 0 
 Frame1.Width = Me.ScaleWidth 
   If Me.Width < 3000 Then Me.Width = 3000 
  SizeControls imgSplitter.Left 
End Sub 
 
 
 
Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 
  With imgSplitter 
    picSplitter.Move .Left, .Top 
  End With 
  picSplitter.Visible = True 
  mbMoving = True 
End Sub 
 
Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 
  Dim sglPos As Single 
   
  If mbMoving Then 
    sglPos = X + imgSplitter.Left 
    If sglPos < sglSplitLimit Then 
      picSplitter.Left = sglSplitLimit 
    ElseIf sglPos > Me.Width - sglSplitLimit Then 
      picSplitter.Left = Me.Width - sglSplitLimit 
    Else 
      picSplitter.Left = sglPos 
    End If 
  End If 
End Sub 
Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 
  SizeControls picSplitter.Left 
  picSplitter.Visible = False 
  mbMoving = False 
End Sub 
 
Sub SizeControls(X As Single) 
  On Error Resume Next 
   
  'set the width 
  If X < 1500 Then X = 1500 
  If X > (Me.Width - 1500) Then X = Me.Width - 1500 
  PicShow.Width = X 
  imgSplitter.Left = X 
  LVCaoZuo.Left = X + 90 
  LVCaoZuo.Width = Me.Width - (PicShow.Width + 140) - 200 
  imgSplitter.Top = PicShow.Top 
  'imgSplitter.Height = PicShow.Height 
End Sub 
 
Private Sub picshow_DragDrop(Source As Control, X As Single, Y As Single) 
  If Source = imgSplitter Then 
    SizeControls X 
  End If 
End Sub