?? pagesetup.frm
字號:
VERSION 5.00
Begin VB.Form form5
BorderStyle = 3 'Fixed Dialog
Caption = "Page Setup"
ClientHeight = 1305
ClientLeft = 3075
ClientTop = 2730
ClientWidth = 3270
Icon = "PageSetup.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 1305
ScaleWidth = 3270
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 2160
TabIndex = 6
Top = 780
Width = 975
End
Begin VB.CommandButton cmdOK
Caption = "&OK"
Default = -1 'True
Height = 375
Left = 2160
TabIndex = 5
Top = 240
Width = 975
End
Begin VB.Frame Frame1
Caption = "Margins"
Height = 1155
Left = 120
TabIndex = 0
Top = 60
Width = 1935
Begin VB.TextBox txtRight
Height = 285
Left = 720
TabIndex = 4
Top = 720
Width = 1095
End
Begin VB.TextBox txtLeft
Height = 285
Left = 720
TabIndex = 2
Top = 300
Width = 1095
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Right"
Height = 195
Left = 120
TabIndex = 3
Top = 780
Width = 375
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Left"
Height = 195
Left = 120
TabIndex = 1
Top = 360
Width = 270
End
End
End
Attribute VB_Name = "form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If Val(txtLeft.Text) < 0 Then
MsgBox "El margen izquierdo no puede ser menor a 1", 16, "Margen"
txtLeft.SelStart = 0
txtLeft.SelLength = Len(txtLeft.Text)
txtLeft.SetFocus
ElseIf Val(txtRight.Text) < 0 Then
MsgBox "El margen derecho no puede ser menor a 1", 16, "Margen"
txtRight.SelStart = 0
txtRight.SelLength = Len(txtRight.Text)
txtRight.SetFocus
Else
Dim lngOldStart As Long
Dim lngOldLength As Long
With ChildForms(frm).text1
lngOldStart = .SelStart
lngOldLength = .SelLength
.SelStart = 0
.SelLength = Len(.Text)
.SelIndent = CInt(Val(txtLeft.Text) * 1440)
.SelRightIndent = CInt(Val(txtRight.Text) * 1440)
.SelStart = lngOldStart
.SelLength = lngOldLength
End With
Unload Me
End If
End Sub
Private Sub Form_Load()
With ChildForms(frm).text1
Dim sglLeft As Single
Dim sglRight As Single
sglLeft = .SelIndent
sglLeft = sglLeft / 1440#
sglLeft = CInt(sglLeft * 100#)
sglLeft = sglLeft / 100#
txtLeft.Text = Trim(Str(sglLeft))
sglRight = .SelRightIndent
sglRight = sglRight / 1440#
sglRight = CInt(sglRight * 100#)
sglRight = sglRight / 100#
txtRight.Text = Trim(Str(sglRight))
End With
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -