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

📄 form1.ebf

📁 windows mobile 应用程序开发实践一书的源代码
💻 EBF
字号:
VERSION 5.00
Begin VB.Form Form1 
   Appearance      =   0  'Flat
   BackColor       =   &H00FFC0FF&
   Caption         =   "Form1"
   ClientHeight    =   5250
   ClientLeft      =   60
   ClientTop       =   840
   ClientWidth     =   5085
   ForeColor       =   &H80000008&
   ScaleHeight     =   5250
   ScaleWidth      =   5085
   ShowOK          =   -1  'True
   Begin VBCE.CommandButton Command3 
      Height          =   495
      Left            =   2400
      TabIndex        =   8
      Top             =   1560
      Width           =   1215
      _cx             =   2143
      _cy             =   873
      BackColor       =   12632256
      Caption         =   "SetText"
      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
      Style           =   0
   End
   Begin VBCE.CommandButton Command2 
      Height          =   495
      Left            =   0
      TabIndex        =   7
      Top             =   1560
      Width           =   1095
      _cx             =   1931
      _cy             =   873
      BackColor       =   12632256
      Caption         =   "GetText"
      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
      Style           =   0
   End
   Begin VBCE.CommandButton Command1 
      Height          =   495
      Left            =   1080
      TabIndex        =   6
      Top             =   1560
      Width           =   1335
      _cx             =   2355
      _cy             =   873
      BackColor       =   12632256
      Caption         =   " GetFormat"
      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
      Style           =   0
   End
   Begin VBCE.TextBox GetFormat 
      Height          =   495
      Left            =   720
      TabIndex        =   5
      Top             =   960
      Width           =   2895
      _cx             =   5106
      _cy             =   873
      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          =   375
      Left            =   0
      TabIndex        =   4
      Top             =   1035
      Width           =   735
      _cx             =   1296
      _cy             =   661
      AutoSize        =   0   'False
      BackColor       =   -2147483643
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "GetFormat"
      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 SetText 
      Height          =   495
      Left            =   720
      TabIndex        =   3
      Top             =   480
      Width           =   2895
      _cx             =   5106
      _cy             =   873
      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          =   375
      Left            =   0
      TabIndex        =   2
      Top             =   555
      Width           =   735
      _cx             =   1296
      _cy             =   661
      AutoSize        =   0   'False
      BackColor       =   -2147483643
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "SetText"
      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 GetText 
      Height          =   495
      Left            =   720
      TabIndex        =   1
      Top             =   0
      Width           =   2895
      _cx             =   5106
      _cy             =   873
      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 Label1 
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   70
      Width           =   735
      _cx             =   1296
      _cy             =   661
      AutoSize        =   0   'False
      BackColor       =   -2147483643
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "GetText"
      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 Command1_Click()
  Dim ClpFmt, Msg   ' 声明变量。
   On Error Resume Next   ' 设置错误处理。
   If Clipboard.GetFormat(vbCFText) Then ClpFmt = ClpFmt + 1
   If Clipboard.GetFormat(vbCFBitmap) Then ClpFmt = ClpFmt + 2
   If Clipboard.GetFormat(vbCFDIB) Then ClpFmt = ClpFmt + 4
   If Clipboard.GetFormat(vbCFRTF) Then ClpFmt = ClpFmt + 8
   Select Case ClpFmt
      Case 1
         Msg = "剪切板只包含文字."
      Case 2, 4, 6
         Msg = "剪切板只包含bitmap."
      Case 3, 5, 7
         Msg = "剪切板包含文字和图片 ."
      Case 8, 9
         Msg = "剪切板只包含包含多行文字."
      Case Else
         Msg = "剪切板不包含内容"
         End Select
  GetFormat.Text = Msg
  
End Sub

 

Private Sub Command2_Click()

 Dim I, Msg, Temp   ' 声明变量。
   On Error Resume Next   ' 设置错误处理。
   Msg = "输入你需要显示的内容"
   GetText.Text = InputBox(Msg)  ' 取得用户正文。
 
   Clipboard.Clear   ' 清除剪贴板。
   Clipboard.SetText GetText.Text  ' 将正文放置在剪贴板上。
   If Clipboard.GetFormat(vbCFText) Then
      GetText.Text = ""   ' 清除该正文框。
      Temp = Clipboard.GetText(vbCFText)   ' 取得剪贴板正文。
      For I = Len(Temp) To 1 Step -1   ' 使该正文反向。
         GetText.Text = GetText.Text & Mid(Temp, I, 1)
      Next I
   Else
      Msg = "剪切板山没有内容"
      MsgBox Msg   ' 显示错误信息。
   End If


End Sub

Private Sub Command3_Click()



 Dim I, Msg, Temp   ' 声明变量。
   On Error Resume Next   ' 设置错误处理。
   Msg = "输入你需要显示的内容"
   SetText.Text = InputBox(Msg)  ' 取得用户正文。
   Msg = "点击OK将内容拷贝到剪贴板 "
   Msg = Msg & "将贴到剪贴板"
   Clipboard.Clear   ' 清除剪贴板。
   Clipboard.SetText SetText.Text  ' 将正文放置在剪贴板上。
   If Clipboard.GetFormat(vbCFText) Then
      SetText.Text = ""   ' 清除该正文框。
      Temp = Clipboard.GetText(vbCFText)   ' 取得剪贴板正文。
      For I = Len(Temp) To 1 Step -1   ' 使该正文反向。
         SetText.Text = SetText.Text & Mid(Temp, I, 1)
      Next I
   Else
      Msg = "剪贴板没有内容"
      SetText.Text = Msg ' 显示错误信息。
   End If


End Sub

Private Sub Form_OKClick()
    App.End
End Sub

⌨️ 快捷键说明

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