?? form2.frm
字號:
VERSION 5.00
Begin VB.Form Form2
BorderStyle = 0 'None
Caption = "Form2"
ClientHeight = 1185
ClientLeft = 7590
ClientTop = 5850
ClientWidth = 1665
Icon = "form2.frx":0000
LinkTopic = "Form2"
Picture = "form2.frx":2C6A
ScaleHeight = 1185
ScaleWidth = 1665
ShowInTaskbar = 0 'False
Begin VB.PictureBox Picture3
Height = 255
Left = 1080
Picture = "form2.frx":3C06
ScaleHeight = 195
ScaleWidth = 195
TabIndex = 3
Top = 720
Visible = 0 'False
Width = 255
End
Begin VB.PictureBox Picture2
Height = 255
Left = 1080
Picture = "form2.frx":4AE2
ScaleHeight = 195
ScaleWidth = 195
TabIndex = 2
Top = 240
Visible = 0 'False
Width = 255
End
Begin VB.PictureBox Picture1
Height = 255
Left = 600
Picture = "form2.frx":59D7
ScaleHeight = 195
ScaleWidth = 315
TabIndex = 1
Top = 240
Visible = 0 'False
Width = 375
End
Begin VB.PictureBox Picture0
Height = 375
Left = 240
Picture = "form2.frx":69C7
ScaleHeight = 315
ScaleWidth = 195
TabIndex = 0
Top = 120
Visible = 0 'False
Width = 255
End
Begin VB.Timer Timer1
Left = 240
Top = 600
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Dim My_Picture(0 To 3) As Picture
Dim Times As Integer
Dim hRgn As Long
Dim MouseDown As Boolean
Dim TmpX, TmpY As Single
Private Sub Form_DblClick()
Unload Form2
Unload Form1
End Sub
Private Sub Form_Load()
Set My_Picture(0) = Picture0.Picture
Set My_Picture(1) = Picture1.Picture
Set My_Picture(2) = Picture2.Picture
Set My_Picture(3) = Picture3.Picture
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, &H1 Or &H2
tims = 0
Timer1.Interval = 200
Timer1.Enabled = True
Form2.Picture = My_Picture(0)
MouseDown = False
hRgn = CreateEllipticRgn(0, 0, Form2.ScaleX(Form2.Width, vbTwips, vbPixels), Form2.ScaleY(Form2.Height, vbTwips, vbPixels))
SetWindowRgn Form2.hwnd, hRgn, True
Load Form1
Form1.Show
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
MouseDown = True
TmpX = x
TmpY = y
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If (MouseDown) Then
Form2.Move Form2.Left + (x - TmpX), Form2.Top + (y - TmpY)
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
MouseDown = False
If Button = vbRightButton Then
MsgBox "Computer00 祝大家元宵節快樂!" & vbCrLf & "歡迎訪問我的個人博客:http://computer00.21ic.org", vbOKOnly, "歡度新春"
End If
While (Form2.Top - 150 > 0 Or Form2.Left - Form2.Width + 100 < Screen.Width)
If Form2.Top - 150 > 0 Then Form2.Move Form2.Left, Form2.Top - 100
If Form2.Left + Form2.Width + 100 < Screen.Width Then Form2.Move Form2.Left + 80, Form2.Top
DoEvents
Sleep 10
Wend
End Sub
Private Sub Timer1_Timer()
Form2.Picture = My_Picture(Times)
Times = Times + 1
If Times = 4 Then Times = 0
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -