⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.ebf

📁 windows mobile 应用程序开发实践一书的源代码
💻 EBF
字号:
VERSION 5.00
Object = "{6556ED95-9838-11D1-80AE-00C04FAD5EFB}#1.0#0"; "mscelistview.dll"
Begin VB.Form Form1 
   Appearance      =   0  'Flat
   BackColor       =   &H00FFC0C0&
   Caption         =   "Form1"
   ClientHeight    =   5340
   ClientLeft      =   60
   ClientTop       =   840
   ClientWidth     =   5835
   ForeColor       =   &H80000008&
   ScaleHeight     =   5340
   ScaleWidth      =   5835
   ShowOK          =   -1  'True
   Begin MSCELISTVIEWLibCtl.ListViewCtrl lv 
      Height          =   1935
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3135
      _cx             =   5530
      _cy             =   3413
      FontBold        =   0   'False
      FontItalic      =   0   'False
      FontName        =   "Arial"
      FontSize        =   8
      FontStrikethrough=   0   'False
      FontUnderline   =   0   'False
      HideColumnHeaders=   0   'False
      HideSelection   =   -1  'True
      LabelEdit       =   0
      LabelWrap       =   0   'False
      MultiSelect     =   0   'False
      Sorted          =   0   'False
      SortKey         =   0
      SortOrder       =   0
      View            =   3
      Enabled         =   -1  'True
   End
   Begin VBCE.TextBox Text4 
      Height          =   375
      Left            =   1080
      TabIndex        =   9
      Top             =   3480
      Width           =   2055
      _cx             =   3625
      _cy             =   661
      BackColor       =   -2147483643
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Text            =   ""
      Alignment       =   0
      HideSelection   =   -1  'True
      Locked          =   0   'False
      MaxLength       =   0
      MultiLine       =   0   'False
      PasswordChar    =   ""
      ScrollBars      =   0
   End
   Begin VBCE.Label Label5 
      Height          =   375
      Left            =   0
      TabIndex        =   8
      Top             =   3480
      Width           =   1095
      _cx             =   1931
      _cy             =   661
      AutoSize        =   0   'False
      BackColor       =   12648384
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "SubItemIndex"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Alignment       =   0
      UseMnemonic     =   -1  'True
      WordWrap        =   0   'False
   End
   Begin VBCE.TextBox Text3 
      Height          =   375
      Left            =   1080
      TabIndex        =   7
      Top             =   3120
      Width           =   2055
      _cx             =   3625
      _cy             =   661
      BackColor       =   -2147483643
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Text            =   ""
      Alignment       =   0
      HideSelection   =   -1  'True
      Locked          =   0   'False
      MaxLength       =   0
      MultiLine       =   0   'False
      PasswordChar    =   ""
      ScrollBars      =   0
   End
   Begin VBCE.Label Label4 
      Height          =   255
      Left            =   0
      TabIndex        =   6
      Top             =   3120
      Width           =   1095
      _cx             =   1931
      _cy             =   450
      AutoSize        =   0   'False
      BackColor       =   16777152
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "Index"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Alignment       =   0
      UseMnemonic     =   -1  'True
      WordWrap        =   0   'False
   End
   Begin VBCE.TextBox Text2 
      Height          =   375
      Left            =   1080
      TabIndex        =   5
      Top             =   2760
      Width           =   2055
      _cx             =   3625
      _cy             =   661
      BackColor       =   -2147483643
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Text            =   ""
      Alignment       =   0
      HideSelection   =   -1  'True
      Locked          =   0   'False
      MaxLength       =   0
      MultiLine       =   0   'False
      PasswordChar    =   ""
      ScrollBars      =   0
   End
   Begin VBCE.Label Label3 
      Height          =   255
      Left            =   0
      TabIndex        =   4
      Top             =   2760
      Width           =   1095
      _cx             =   1931
      _cy             =   450
      AutoSize        =   0   'False
      BackColor       =   16761087
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "Key"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Alignment       =   0
      UseMnemonic     =   -1  'True
      WordWrap        =   0   'False
   End
   Begin VBCE.TextBox Text1 
      Height          =   375
      Left            =   1080
      TabIndex        =   3
      Top             =   2400
      Width           =   2055
      _cx             =   3625
      _cy             =   661
      BackColor       =   -2147483643
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Text            =   ""
      Alignment       =   0
      HideSelection   =   -1  'True
      Locked          =   0   'False
      MaxLength       =   0
      MultiLine       =   0   'False
      PasswordChar    =   ""
      ScrollBars      =   0
   End
   Begin VBCE.Label Label2 
      Height          =   255
      Left            =   0
      TabIndex        =   2
      Top             =   2400
      Width           =   1095
      _cx             =   1931
      _cy             =   450
      AutoSize        =   0   'False
      BackColor       =   -2147483643
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "Text"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Alignment       =   0
      UseMnemonic     =   -1  'True
      WordWrap        =   0   'False
   End
   Begin VBCE.Label Label1 
      Height          =   375
      Left            =   840
      TabIndex        =   1
      Top             =   2040
      Width           =   2055
      _cx             =   3625
      _cy             =   661
      AutoSize        =   0   'False
      BackColor       =   16761087
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "ColumnHeader属性测试"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Alignment       =   0
      UseMnemonic     =   -1  'True
      WordWrap        =   0   'False
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()

 lv.View = lvwReport

   '添加三列。
   lv.ColumnHeaders.Add , "Name", "Name"
   lv.ColumnHeaders.Add , "Address", "Address"
   lv.ColumnHeaders.Add , "Phone", "Phone"

   '向控件添加 ListItem 对象。
   Dim itmX As ListItem
   '添加 column 1 的名称。
   Set itmX = lv.ListItems.Add(1, "Mary", "Mary")
   '使用 SubItemIndex 将 SubItem 与正确的
   ' ColumnHeader 关联。使用关键字 ("Address") 指定正确的
   ' ColumnHeader。
   itmX.SubItems(lv.ColumnHeaders("Address").SubItemIndex) _
   = "212 Grunge Street"
   '使用 ColumnHeader 关键字将 SubItems 字符串与
   '正确的 ColumnHeader 关联。
   itmX.SubItems(lv.ColumnHeaders("Phone").SubItemIndex) _
   = "555-1212"

   Set itmX = lv.ListItems.Add(2, "Bill", "Bill")
   itmX.SubItems(lv.ColumnHeaders("Address").SubItemIndex) _
   = "101 Pacific Way"
   itmX.SubItems(lv.ColumnHeaders("Phone").SubItemIndex) _
   = "555-7879"

   Set itmX = lv.ListItems.Add(3, "Susan", "Susan")
   itmX.SubItems(lv.ColumnHeaders("Address").SubItemIndex) = _
   "800 Chicago Street"
   itmX.SubItems(lv.ColumnHeaders("Phone").SubItemIndex) = _
   "555-4537"

   Set itmX = lv.ListItems.Add(4, "Tom", "Tom")
   itmX.SubItems(lv.ColumnHeaders("Address").SubItemIndex) _
   = "200 Ocean City"
   itmX.SubItems(lv.ColumnHeaders("Phone").SubItemIndex) = _
   "555-0348"
   
    Dim ch As ColumnHeader
    Set ch = lv.ColumnHeaders(1)
 
    Text1.Text = ch.Text
    Text2.Text = ch.Key
    Text3.Text = ch.Index
    Text4.Text = ch.SubItemIndex
    
    
  
End Sub

Private Sub Form_OKClick()
    App.End
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -