?? font.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form2
BorderStyle = 1 'Fixed Single
Caption = "Font"
ClientHeight = 3630
ClientLeft = 45
ClientTop = 330
ClientWidth = 5865
Icon = "Font.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3630
ScaleWidth = 5865
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Caption = "&Cancelar"
Height = 375
Left = 4920
TabIndex = 14
Top = 960
Width = 855
End
Begin VB.CommandButton Command1
Caption = "&Aceptar"
Height = 375
Left = 4920
TabIndex = 13
Top = 480
Width = 855
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 4920
Top = 2640
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Frame Frame2
Caption = "Color"
Height = 855
Left = 3600
TabIndex = 10
Top = 2040
Width = 855
Begin VB.Label Label3
BackColor = &H00000000&
Height = 255
Left = 120
TabIndex = 11
Top = 360
Width = 615
End
End
Begin VB.Frame Frame1
Caption = "Appearance"
Height = 1695
Left = 3360
TabIndex = 5
Top = 240
Width = 1335
Begin VB.CheckBox Check4
Caption = "Strikethru"
Height = 255
Left = 120
TabIndex = 9
Top = 1320
Width = 1095
End
Begin VB.CheckBox Check3
Caption = "Underline"
Height = 255
Left = 120
TabIndex = 8
Top = 960
Width = 1095
End
Begin VB.CheckBox Check2
Caption = "Italic"
Height = 255
Left = 120
TabIndex = 7
Top = 600
Width = 855
End
Begin VB.CheckBox Check1
Caption = "Bold"
Height = 255
Left = 120
TabIndex = 6
Top = 240
Width = 855
End
End
Begin VB.ListBox List2
Height = 1815
Left = 2160
TabIndex = 4
Top = 840
Width = 735
End
Begin VB.TextBox Text1
Height = 285
Left = 2160
TabIndex = 3
Text = "Text1"
Top = 480
Width = 735
End
Begin VB.ListBox List1
Height = 2205
Left = 120
Sorted = -1 'True
TabIndex = 0
Top = 480
Width = 1695
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Caption = "Sample Text"
Height = 615
Left = 120
TabIndex = 12
Top = 2880
Width = 2895
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Size"
Height = 195
Left = 2400
TabIndex = 2
Top = 240
Width = 300
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Font Face"
Height = 195
Left = 600
TabIndex = 1
Top = 240
Width = 720
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ret As Integer
Private Sub Check1_Click()
If Check1.Value = 1 Then
Label4.FontBold = True
Else
Label4.FontBold = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
Label4.FontItalic = True
Else
Label4.FontItalic = False
End If
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then
Label4.FontUnderline = True
Else
Label4.FontUnderline = False
End If
End Sub
Private Sub Check4_Click()
If Check4.Value = 1 Then
Label4.FontStrikethru = True
Else
Label4.FontStrikethru = False
End If
End Sub
Private Sub Command1_Click()
ChildForms(ret).Text1.SelFontName = Label4.FontName
ChildForms(ret).Text1.SelFontSize = Label4.FontSize
ChildForms(ret).Text1.SelBold = Label4.FontBold
ChildForms(ret).Text1.SelItalic = Label4.FontItalic
ChildForms(ret).Text1.SelUnderline = Label4.FontUnderline
ChildForms(ret).Text1.SelStrikeThru = Label4.FontStrikethru
ChildForms(ret).Text1.SelColor = Label4.ForeColor
Unload Me
MDIForm1.StatusBar1.Panels(1).Width = 3000
MDIForm1.StatusBar1.Panels(1).Text = "Welcome to XtremePad"
End Sub
Private Sub Command2_Click()
Unload Me
MDIForm1.StatusBar1.Panels(1).Width = 3000
MDIForm1.StatusBar1.Panels(1).Text = "Welcome to XtremePad"
End Sub
Private Sub Form_Load()
MDIForm1.StatusBar1.Panels(1).Width = 3000
MDIForm1.StatusBar1.Panels(1).Text = "Loading fonts ... please wait"
ret = frm
Debug.Print ret
For x = 1 To Screen.FontCount
List1.AddItem Screen.Fonts(x)
Next
For x = 5 To 72: List2.AddItem Str$(x): Next
For x = 0 To List1.ListCount - 1
If ChildForms(ret).Text1.SelFontName = List1.List(x) Then
List1.ListIndex = x
Label4.FontName = List1.List(x)
Exit For
End If
Next
For x = 0 To List2.ListCount - 1
If Int(Val(ChildForms(ret).Text1.SelFontSize)) = Val(List2.List(x)) Then
List2.ListIndex = x
Label4.FontSize = Val(List2.List(x))
Text1.Text = List2.List(x)
Exit For
End If
Next
If ChildForms(ret).Text1.SelBold = True Then
Label4.FontBold = True
Check1.Value = 1
End If
If ChildForms(ret).Text1.SelItalic = True Then
Label4.FontItalic = True
Check2.Value = 1
End If
If ChildForms(ret).Text1.SelUnderline = True Then
Label4.FontUnderline = True
Check3.Value = 1
End If
If ChildForms(ret).Text1.SelStrikeThru = True Then
Label4.FontStrikethru = True
Check4.Value = 1
End If
MDIForm1.StatusBar1.Panels(1).Width = 3000
MDIForm1.StatusBar1.Panels(1).Text = "Done."
End Sub
Private Sub Label3_Click()
CommonDialog1.ShowColor
Label3.BackColor = CommonDialog1.Color
Label4.ForeColor = CommonDialog1.Color
End Sub
Private Sub List1_Click()
Label4.FontName = List1.List(List1.ListIndex)
End Sub
Private Sub List2_Click()
Text1.Text = List2.List(List2.ListIndex)
Label4.FontSize = Val(Text1.Text)
End Sub
Private Sub Text1_Change()
For x = 0 To List2.ListCount - 1
If Val(Text1.Text) = Val(List2.List(x)) Then
List2.ListIndex = x
Label4.FontSize = Val(Text1.Text)
Exit For
End If
Next
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -