?? frm_about.frm
字號:
VERSION 5.00
Begin VB.Form frm_about
BackColor = &H00000000&
Caption = "關于"
ClientHeight = 4185
ClientLeft = 60
ClientTop = 345
ClientWidth = 5985
Icon = "frm_about.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4185
ScaleWidth = 5985
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox picScroll
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00000000&
ForeColor = &H000000FF&
Height = 2535
Left = 360
ScaleHeight = 167
ScaleMode = 3 'Pixel
ScaleWidth = 343
TabIndex = 0
Top = 720
Width = 5175
End
Begin VB.Label lblExit
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "EXIT"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 240
Left = 5160
TabIndex = 1
Top = 3720
Width = 510
End
End
Attribute VB_Name = "frm_About"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private Declare Function GetTickCount Lib "kernel32" () As Long
Const DT_BOTTOM As Long = &H8
Const DT_CALCRECT As Long = &H400
Const DT_CENTER As Long = &H1
Const DT_EXPANDTABS As Long = &H40
Const DT_EXTERNALLEADING As Long = &H200
Const DT_LEFT As Long = &H0
Const DT_NOCLIP As Long = &H100
Const DT_NOPREFIX As Long = &H800
Const DT_RIGHT As Long = &H2
Const DT_SINGLELINE As Long = &H20
Const DT_TABSTOP As Long = &H80
Const DT_TOP As Long = &H0
Const DT_VCENTER As Long = &H4
Const DT_WORDBREAK As Long = &H10
Const ScrollText As String = "謝謝您使用小財迷" & vbCrLf & _
vbCrLf & vbCrLf & _
"如果遇到任何問題 " & vbCrLf & _
vbCrLf & vbCrLf & _
"請聯系我cqxixi@163.com " & _
vbCrLf & vbCrLf & _
vbCrLf & "我將盡快給你答復" & _
vbCrLf & vbCrLf & _
vbCrLf & "版本號: beta 1.0 " & _
vbCrLf & vbCrLf & _
vbCrLf & vbCrLf & _
"2003年9月30日"
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
'the actual text to scroll. This could also be loaded in from a text file
Dim EndingFlag As Boolean
Private Sub Form_Activate()
RunMain
End Sub
Private Sub Form_Load()
picScroll.ForeColor = vbYellow
picScroll.FontSize = 14
End Sub
Private Sub RunMain()
Dim LastFrameTime As Long
Const IntervalTime As Long = 40
Dim rt As Long
Dim DrawingRect As RECT
Dim UpperX As Long, UpperY As Long 'Upper left point of drawing rect
Dim RectHeight As Long
'show the form
frm_About.Refresh
'Get the size of the drawing rectangle by suppying the DT_CALCRECT constant
rt = DrawText(picScroll.hdc, ScrollText, -1, DrawingRect, DT_CALCRECT)
If rt = 0 Then 'err
MsgBox "Error scrolling text", vbExclamation
EndingFlag = True
Else
DrawingRect.Top = picScroll.ScaleHeight
DrawingRect.Left = 0
DrawingRect.Right = picScroll.ScaleWidth
'Store the height of The rect
RectHeight = DrawingRect.Bottom
DrawingRect.Bottom = DrawingRect.Bottom + picScroll.ScaleHeight
End If
Do While Not EndingFlag
If GetTickCount() - LastFrameTime > IntervalTime Then
picScroll.Cls
DrawText picScroll.hdc, ScrollText, -1, DrawingRect, DT_CENTER Or DT_WORDBREAK
'update the coordinates of the rectangle
DrawingRect.Top = DrawingRect.Top - 1
DrawingRect.Bottom = DrawingRect.Bottom - 1
'control the scolling and reset if it goes out of bounds
If DrawingRect.Top < -(RectHeight) Then 'time to reset
DrawingRect.Top = picScroll.ScaleHeight
DrawingRect.Bottom = RectHeight + picScroll.ScaleHeight
End If
picScroll.Refresh
LastFrameTime = GetTickCount()
End If
DoEvents
Loop
Unload Me
Set frm_About = Nothing
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblExit.ForeColor = vbYellow
End Sub
Private Sub Form_Unload(Cancel As Integer)
EndingFlag = True
End Sub
Private Sub lblExit_Click()
Beep
EndingFlag = True
End Sub
Private Sub lblExit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblExit.ForeColor = vbRed
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -