Form5.frm
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:13k
- VERSION 5.00
- Begin VB.Form Form5
- BorderStyle = 0 'None
- Caption = "Form5"
- ClientHeight = 570
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 3165
- ControlBox = 0 'False
- ForeColor = &H000000FF&
- LinkTopic = "Form5"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 570
- ScaleWidth = 3165
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 '窗口缺省
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 10
- Left = 600
- Top = 1320
- End
- Begin VB.Timer Timer2
- Interval = 6000
- Left = 0
- Top = 1320
- End
- Begin VB.CommandButton Command1
- Height = 165
- Left = 3000
- MousePointer = 8 'Size NW SE
- TabIndex = 1
- Top = 420
- Width = 165
- End
- Begin VB.Line Line1
- X1 = 0
- X2 = 3480
- Y1 = 1920
- Y2 = 1920
- End
- Begin VB.Image Image6
- Height = 195
- Left = 2760
- Picture = "Form5.frx":0000
- Stretch = -1 'True
- ToolTipText = "钉住窗口"
- Top = 270
- Width = 300
- End
- Begin VB.Image Image3
- Height = 90
- Left = -120
- MousePointer = 1 'Arrow
- Picture = "Form5.frx":061C
- Stretch = -1 'True
- ToolTipText = "启停输入法"
- Top = 480
- Width = 3435
- End
- Begin VB.Image Image7
- Height = 60
- Left = -90
- MousePointer = 10 'Up Arrow
- Picture = "Form5.frx":0AAD
- Stretch = -1 'True
- ToolTipText = "缩小窗口"
- Top = 0
- Width = 3405
- End
- Begin VB.Image Image4
- Height = 735
- Left = 3060
- MousePointer = 1 'Arrow
- Picture = "Form5.frx":0F3E
- Stretch = -1 'True
- Top = -60
- Width = 105
- End
- Begin VB.Image Image1
- Height = 195
- Left = 2760
- MousePointer = 1 'Arrow
- Picture = "Form5.frx":1613
- Stretch = -1 'True
- ToolTipText = "点击可关闭输入法"
- Top = 60
- Width = 315
- End
- Begin VB.Image Image8
- Height = 1125
- Left = 0
- MousePointer = 1 'Arrow
- Picture = "Form5.frx":1DAB
- Stretch = -1 'True
- Top = -90
- Width = 90
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- BorderStyle = 1 'Fixed Single
- Caption = " 《极速五笔》"
- BeginProperty Font
- Name = "宋体"
- Size = 18
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 435
- Left = 90
- MousePointer = 15 'Size All
- TabIndex = 0
- Top = 60
- Width = 3060
- End
- Begin VB.Image Image5
- Height = 1170
- Left = 0
- Picture = "Form5.frx":2480
- Stretch = -1 'True
- Top = 0
- Width = 3105
- End
- End
- Attribute VB_Name = "Form5"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Down As Integer
- Dim SY As Single
- Dim SX As Single
- Dim myTop As Single
- Dim myLeft As Single
- Dim hight As Long
- Dim FirstHight As Long
- Dim aa As Long
-
- Dim MyWidth As Single
- Dim MyHeight As Single
- Dim tt As Integer
- Dim style As Integer
- Private Declare Function mypassmdb Lib "mytools.dll" (ByVal FileName As String, ByVal PassWord As String) As Boolean
- Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- Down = 1
- SX = x
- SY = y
- MyWidth = Form5.width
- MyHeight = Form5.Height
- End Sub
- Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- Dim temMyWidth As Single
- Dim temMyHeight As Single
- Dim addX As Single
- Dim LBfont As Single
- Dim LBWidth As Single
- Dim LBHeight As Single
- tt = tt + 1
- If Down = 1 And tt > 5 Then
- tt = 0
- addX = (x - SX) / 10
-
- temMyHeight = Form5.Height + addX
-
- LBWidth = Label1.width + addX * 5.58
- LBHeight = Label1.Height + addX
- LBfont = Label1.Height / 24
-
- If (temMyHeight > 0 And LBWidth > 0 And LBHeight > 0 And LBfont > 0) Then
-
- FirstHight = FirstHight + addX
-
- Form5.Height = temMyHeight
- Form5.width = temMyHeight * 5.58
-
-
- Label1.width = LBWidth
- Label1.Height = LBHeight
- Label1.FontSize = LBfont
-
- Image8.Height = Image8.Height + addX
-
- Image4.Left = Form5.width - 105
- Image4.Height = Image4.Height + addX
-
- Image3.Top = Image3.Top + addX
- Image3.width = Form5.width + 100
-
- Image5.Height = Form5.Height
- Image5.width = Form5.width + 100
-
-
- Image7.width = Form5.width + 100
-
- Command1.Left = Form5.width - Command1.width
- Command1.Top = Command1.Top + addX
-
- Image1.Left = Form5.width - 375
- Image6.Left = Form5.width - 375
-
- End If
- End If
- End Sub
- Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- MySetActiveWindow act
- Down = 0
- End Sub
- Private Sub Form_Load()
- Image5.Height = Form4.Height
- FirstHight = 435
- NumPicture = 2
- style = 0
-
- End Sub
- Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- MySetActiveWindow act
- End Sub
- Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- If (x > 0 And x < 300 And y > 0 And y < 300) Then
- If Button = 1 Then
- If (Shift = 0) Then
- Form4Hight = Form4.Height
- Form4.Height = 60
- Image7_MouseUp Button, Shift, x, y
- Else
- DilamicWin.myClose
- End '直接使用END将不会作后处理。可能形成错误
- End If
- End If
- End If
- End Sub
- Private Sub Image2_Click()
- MySetActiveWindow act
- End Sub
- Private Sub Image2_DblClick()
- MySetActiveWindow act
- End Sub
- Private Sub Image2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- Label1_MouseDown 0, Button, x, y
- End Sub
- Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- Label1_MouseMove 0, Button, x, y
- End Sub
- Private Sub Image2_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- Label1_MouseUp 0, Button, x, y
- End Sub
- Private Sub Image3_Click()
- MySetActiveWindow act
- keybd_event 27, 0, 0, 1
- End Sub
- Private Sub Image4_Click()
- Dim fso, f
- Set fso = CreateObject("Scripting.FileSystemObject")
-
- If (fso.FileExists(WorkPath & "back" & NumPicture & ".jpg") = False) Then
- NumPicture = 1
- End If
-
- If (fso.FileExists(WorkPath & "back" & NumPicture & ".jpg")) Then
- Image5.Picture = LoadPicture(WorkPath & "back" & NumPicture & ".jpg")
- End If
-
- NumPicture = NumPicture + 1
-
- MySetActiveWindow act
- End Sub
- Private Sub Image4_DblClick()
- MySetActiveWindow act
- End Sub
- Private Sub Image5_Click()
- MySetActiveWindow act
- End Sub
- Private Sub Image5_DblClick()
- MySetActiveWindow act
- End Sub
- Private Sub Image6_Click()
- Dim fso, f
- Set fso = CreateObject("Scripting.FileSystemObject")
- If (WinTogether = False) Then
- Image6.ToolTipText = "解除钉住"
- If (fso.FileExists(WorkPath & "t2.jpg")) Then
- Image6.Picture = LoadPicture(WorkPath & "t2.jpg")
- End If
- WinTogether = True
- Else
- Image6.ToolTipText = "钉住窗口"
- If (fso.FileExists(WorkPath & "t1.jpg")) Then
- Image6.Picture = LoadPicture(WorkPath & "t1.jpg")
- End If
- WinTogether = False
- End If
- MySetActiveWindow act
- End Sub
- Private Sub Image7_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- If (Button = 1) Then
- If (Form5.Height = 60) Then
- Image7.ToolTipText = "缩小窗口"
- Form5.Height = Form5Hight
- Else
- Form5Hight = Form5.Height
- Form5.Height = 60
- Image7.ToolTipText = "还原窗口"
- End If
- Else
- If (style = 0) Then
- WindowVisable Form5.hwnd
- style = 1
- Else
- ShapeWindow Form5.hwnd, &HFFFFFF
- style = 0
- End If
- End If
- End Sub
- Private Sub Image8_Click()
-
- FirstHight = FirstHight + aa
-
- Label1.width = Label1.width + aa * 5
-
- Label1.FontSize = Label1.FontSize + aa / 20
-
- Label1.Height = Label1.Height + aa
- Form5.Height = Form5.Height + aa
- Form5.width = Form5.width + aa * 5
-
- Image8.Height = Image8.Height + aa
- Image4.Left = Form5.width - 105
- Image4.Height = Image4.Height + aa
-
- Image3.Top = Image3.Top + aa
- Image3.width = Form5.width + 100
-
- Image5.Height = Form5.Height
- Image5.width = Form5.width + 100
-
- Image7.width = Form5.width + 100
-
- Command1.Left = Form5.width - Command1.width
- Command1.Top = Command1.Top + aa
-
- Image1.Left = Form5.width - 375
- Image6.Left = Form5.width - 375
- End Sub
- Private Sub Image8_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- If Shift = 0 Then
- If Button = 2 Then
- aa = aa + 20
- Else
- aa = 20
- End If
- Else
- If Button = 2 Then
- aa = aa - 20
- Else
- aa = -20
- End If
- End If
- End Sub
- Private Sub Image8_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- MySetActiveWindow act
- End Sub
- Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
-
- Down = 1
- SX = x
- SY = y
- myTop = Form5.Top
- myLeft = Form5.Left
- End Sub
- Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
-
- If Down = 1 Then
- If (WinTogether = True) Then
-
- If (myFullWinRect.bottom - myFullWinRect.Top) * 6 < Form5.Top Then
- Form1.Top = Form5.Top + Form5.Height
- Else
- Form1.Top = Form5.Top - Form1.Height
- End If
-
- Form1.Left = Form5.Left
- End If
-
- If (myFullWinRect.bottom - myFullWinRect.Top) * 6 < Form5.Top Then
- Form4.Top = Form5.Top - Form4.Height
- Else
- Form4.Top = Form5.Top + Form5.Height
- End If
-
- Form4.Left = Form5.Left
- Form5.Top = Form5.Top - (SY - y)
- Form5.Left = Form5.Left - (SX - x)
- End If
- End Sub
- Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- Dim mm As cPopupMenu
- Dim flag As String
-
- If (Abs(myTop - Form5.Top) + Abs(myLeft = Form5.Left) < 10) Then
- If Form1.Text1.Text <> "" Then
- ' keybd_event 49, 0, 0, 1 '产生键
- mySendKey = 49
- End If
- End If
-
- Down = 0
-
- If (Button = 2) Then
- Set mm = New cPopupMenu
-
- If (Timer2.Enabled = True) Then flag = "8"
-
- mm.Popup "词语管理", "关 于", "计算农历", flag & "启停时钟", "解密文件", "-"
- Select Case (mm.SelID())
- Case Is = 1
- Shell "词语管理.EXE", 1
- Case Is = 2
- Form2.Show
- Form1.Hide
- Form5.Hide
- Form4.Hide
- Case Is = 3
- Form5.Label1.ToolTipText = 计算农历
- MsgBox Form5.Label1.ToolTipText
- Case Is = 4
- If (Timer2.Enabled = True) Then
- Timer2.Enabled = False
- Else
- Timer2.Enabled = True
- End If
- Case Is = 5
- 解密文件
- End Select
-
- End If
-
- MySetActiveWindow act
-
- End Sub
- Sub 解密文件()
- Dim ss As String * 100
- Dim sFile As String
-
- sFile = OpenDlg(Me.hwnd, "所有文件 (*.*)|*.*", 2)
- If sFile <> "" Then
- mypassmdb sFile, ss
- End If
- MsgBox ss
-
- End Sub
- '显示已进入造词模式
- Private Sub Timer1_Timer()
- If (Line1.Y1 > Me.Height) Then
- Line1.Y1 = 0
- Line1.Y2 = 0
- End If
- Line1.Y1 = Line1.Y1 + 4
- Line1.Y2 = Line1.Y2 + 4
- End Sub
- '每隔一定时间保存一次窗口句柄
- Private Sub Timer2_Timer()
- Dim HKpath As String
- '把代码显示窗口和临时数据窗口句柄保存起来
- HKpath = "Software\jsime"
- SaveRegLong HK_CUR_USER, HKpath, "m_input", Form1.Text1.hwnd
- SaveRegLong HK_CUR_USER, HKpath, "m_List", Form4.Text2.hwnd '接收输入
- SaveRegLong HK_CUR_USER, HKpath, "m_State", Form1.Text3.hwnd
- SaveRegLong HK_CUR_USER, HKpath, "m_display", Form1.hwnd
- End Sub