Formstart.frm
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:15k
- VERSION 5.00
- Object = "{D27CDB6B-AE6D-11CF-96B8-444553540000}#1.0#0"; "swflash.ocx"
- Begin VB.Form Form1
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- BackColor = &H8000000E&
- BorderStyle = 0 'None
- Caption = "Form7"
- ClientHeight = 1185
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 3495
- DrawStyle = 5 'Transparent
- FillStyle = 0 'Solid
- BeginProperty Font
- Name = "黑体"
- Size = 9
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form7"
- PaletteMode = 2 'Custom
- ScaleHeight = 1185
- ScaleWidth = 3495
- ShowInTaskbar = 0 'False
- Begin VB.PictureBox Picture1
- AutoRedraw = -1 'True
- BackColor = &H8000000E&
- BorderStyle = 0 'None
- FillColor = &H00FFFFFF&
- Height = 1035
- Left = 0
- MousePointer = 15 'Size All
- ScaleHeight = 1035
- ScaleWidth = 2925
- TabIndex = 5
- Top = 60
- Width = 2925
- End
- Begin VB.TextBox Text1
- BackColor = &H00FFFFFF&
- CausesValidation= 0 'False
- Enabled = 0 'False
- BeginProperty Font
- Name = "黑体"
- Size = 14.25
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 405
- HideSelection = 0 'False
- IMEMode = 2 'OFF
- Left = 90
- Locked = -1 'True
- MousePointer = 1 'Arrow
- TabIndex = 4
- Top = 1710
- Visible = 0 'False
- Width = 1095
- End
- Begin VB.TextBox Text3
- Enabled = 0 'False
- BeginProperty Font
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- Left = 2550
- TabIndex = 3
- Text = "State"
- Top = 1740
- Width = 855
- End
- Begin VB.PictureBox Picture2
- BeginProperty Font
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 705
- Left = 3600
- Picture = "Formstart.frx":0000
- ScaleHeight = 645
- ScaleWidth = 1095
- TabIndex = 2
- Top = 1560
- Width = 1155
- End
- Begin VB.CommandButton Command1
- Caption = "Command1"
- BeginProperty Font
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 405
- Left = 3180
- TabIndex = 1
- Top = 3510
- Width = 855
- End
- Begin ShockwaveFlashObjectsCtl.ShockwaveFlash ShockwaveFlash1
- DragMode = 1 'Automatic
- Height = 675
- Left = 1350
- TabIndex = 0
- Top = 1410
- Width = 585
- _cx = 4195336
- _cy = 4195495
- Movie = "1.swf"
- Src = "1.swf"
- WMode = "Window"
- Play = -1 'True
- Loop = -1 'True
- Quality = "High"
- SAlign = ""
- Menu = -1 'True
- Base = ""
- Scale = "ExactFit"
- DeviceFont = 0 'False
- EmbedMovie = 0 'False
- BGColor = "003AF2"
- SWRemote = ""
- Stacking = "below"
- End
- Begin VB.Image Image6
- Height = 75
- Left = 540
- MousePointer = 15 'Size All
- Picture = "Formstart.frx":160B8
- Stretch = -1 'True
- Top = 0
- Width = 600
- End
- Begin VB.Image Image1
- Height = 75
- Left = 0
- MousePointer = 1 'Arrow
- Picture = "Formstart.frx":16A2C
- Stretch = -1 'True
- Top = 360
- Width = 1140
- End
- Begin VB.Image Image2
- Height = 75
- Left = 0
- MousePointer = 10 'Up Arrow
- Picture = "Formstart.frx":16EBD
- Stretch = -1 'True
- Top = 0
- Width = 1140
- End
- Begin VB.Image Image3
- Height = 435
- Left = 1080
- MousePointer = 1 'Arrow
- Picture = "Formstart.frx":1734E
- Stretch = -1 'True
- Top = -30
- Width = 75
- End
- Begin VB.Label Label2
- BackColor = &H00FFC0C0&
- BackStyle = 0 'Transparent
- BeginProperty Font
- Name = "宋体"
- Size = 15.75
- Charset = 134
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H000000FF&
- Height = 375
- Left = 120
- MousePointer = 15 'Size All
- TabIndex = 6
- ToolTipText = "要移动窗口吗?"
- Top = 30
- Width = 855
- End
- Begin VB.Image Image4
- Height = 435
- Left = 0
- MousePointer = 1 'Arrow
- Picture = "Formstart.frx":17A23
- Stretch = -1 'True
- Top = 0
- Width = 75
- End
- Begin VB.Image Image5
- BorderStyle = 1 'Fixed Single
- Height = 405
- Left = 60
- MousePointer = 1 'Arrow
- Picture = "Formstart.frx":180F8
- Stretch = -1 'True
- Top = 0
- Width = 1095
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
- Dim Down As Integer
- Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
- Dim SY As Single
- Dim SX As Single
- Dim myTop As Single
- Dim myLeft As Single
- Dim style As Integer
- Dim disfirst As Integer
- Dim tttttt As Long
- Dim IsWinNTVol As Long
- Private Sub Command1_Click()
- DrawASCII 10, 10, 700, 1000, tttttt
- tttttt = tttttt + 1
- End Sub
- Private Sub Form_Load()
- Dim RecordNumber As Long
- Dim fulw As Long
- Dim HKpath As String
- On Error Resume Next
- If App.PrevInstance Then
- ' MsgBox "该程序已经运行!"
- End
- End If
- '把代码显示窗口和临时数据窗口句柄保存起来
- Set DilamicWin = New myWinclass
- DilamicWin.Create App.hInstance, Me.Picture1.hwnd, App.path + "inputbck.bmp", App.path + "inputchr.bmp", App.path + "White.bmp"
- DilamicWin.SetZoom 0.5
- Me.Picture1.Height = 1500
- Me.Picture1.Width = 3000
-
- 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
-
- IsWinNTVol = IsWinNT()
- 'IsWinNTVol = 0
- WorkPath = "c:jsime"
-
- If (IsWinNTVol) Then
- Form1.Width = Form1.Picture1.Width
- Else
- Form1.FontSize = 30
- Form1.BackColor = vbRed
- Form1.Picture1.BackColor = vbRed
- SetText Form1, Image2, "快乐极速5.0"
- End If
-
- ShapeWindow Form5.hwnd, &HFFFFFF
- ShapeWindow Form1.hwnd, &HFFFFFF
- ShapeWindow Form4.hwnd, &HFFFFFF
- act = 0
- style = 0
-
- '置背景图
-
- fulw = GetDesktopWindow()
-
- GetWindowRect fulw, myFullWinRect
- SetWindowPos Form4.hwnd, -1, 0, 0, 0, 0, 3
- SetWindowPos Form1.hwnd, -1, 0, 0, 0, 0, 3
- SetWindowPos Form5.hwnd, -1, 0, 0, 0, 0, 3
- Form1.Move Screen.Width - 2500, Screen.Height - 1500
- Form1.Top = myFullWinRect.bottom * 15 - Form1.Height - 500
-
- Form4.Left = Form5.Left
- Form1.Left = Form4.Left + Form4.Width
- Form5.Top = myFullWinRect.bottom * 15 - Form5.Height - 500
-
- Form4.Top = Form5.Top - Form4.Height
-
- Form4.Show
- Form5.Show
- End Sub
- Private Sub Image1_Click()
- Picture1.Visible = True
- If IsWinNTVol = 1 Then
- IsWinNTVol = 0
- Else
- IsWinNTVol = 1
- End If
- If (IsWinNTVol) Then
- Form1.Width = Form1.Picture1.Width
- Form1.BackColor = &H8000000E
- Form1.Picture1.BackColor = &H8000000E
- Else
- Form1.FontSize = 30
- Form1.BackColor = vbRed
- Form1.Picture1.BackColor = vbRed
- SetText Form1, Image2, "快乐极速5.0"
- End If
- End Sub
- Private Sub Image2_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- If Button = 1 Then
- If Picture1.Visible = True Then
- '需要取消异型窗口
- Form1.Width = Image2.Width
- Form1.Height = Image4.Height
- Picture1.Visible = 0
- If (IsWinNTVol) Then
-
- Else
- SetWindowRgn Form1.hwnd, 0, True
- End If
- Else
- Form1.Width = Picture1.Width
- Form1.Height = Picture1.Height + 75
- '返回异形窗口
- If (IsWinNTVol) Then
- Picture1.Cls
- myshow Text1.Text
- Else
- SetText Form1, Image2, Text1.Text
- End If
-
- Picture1.Visible = 1
- End If
- Else
- If (style = 0) Then
- WindowVisable Form1.hwnd
- style = 1
- Else
- ShapeWindow Form1.hwnd, &HFFFFFF
- style = 0
- End If
- End If
- MySetActiveWindow act
- End Sub
- Private Sub Image3_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_Click()
- MySetActiveWindow act
- End Sub
- Private Sub Image6_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- movestart x, y
- If Button = 2 Then
- DilamicWin.CycSet
- If (DilamicWin.Runing = False) Then
- Text1_Change
- End If
- End If
- End Sub
- Private Sub Image6_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- mymove x, y
- End Sub
- Private Sub Image6_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- moveend
- End Sub
- Private Sub Label2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- movestart x, y
- End Sub
- Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- mymove x, y
- End Sub
- Private Sub Label2_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- moveend
- End Sub
- '//////////////////////////////////////////
- Sub movestart(x As Single, y As Single)
- Down = 1
- SX = x
- SY = y
- myTop = Form1.Top
- myLeft = Form1.Left
- End Sub
- Sub mymove(x As Single, y As Single)
- If Down = 1 Then
- Form1.Top = Form1.Top - (SY - y)
- Form1.Left = Form1.Left - (SX - x)
- If (WinTogether = True) Then
- Form4.Top = Form1.Top + Form1.Height
- Form4.Left = Form1.Left
- End If
-
- End If
- End Sub
- Sub moveend()
- MySetActiveWindow act
- Down = 0
- End Sub
- '//////////////////////////////////////////
- Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
- movestart x, y
- End Sub
- Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
- mymove x, y
- End Sub
- Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
- moveend
- End Sub
- Private Sub Text1_Change()
- Label2.Caption = Text1.Text
- Form1.Visible = 1
- Form4.Visible = 1
- Form5.Visible = 1
- If (Form5.Visible = False) Then
- MySetActiveWindow act
- End If
- If (Text1.Text = "") Then
- Form1.Hide
- Else
- Form1.Show
- End If
-
- '字母显示程序
-
- If (Picture1.Visible = True) Then
- If IsWinNTVol Then
- Picture1.Cls
- Form1.Height = Picture1.Height
- Form1.Width = Picture1.Width
- myshow Text1.Text
- Else
- SetText Form1, Image2, Text1.Text
- End If
- End If
- 'act = GetActiveWindow() '保存活动窗口的句柄
- End Sub
- Private Sub Text3_Change()
- Dim ss As String
- ss = Text3.Text
- ' MsgBox ss
- Select Case ss
- Case "end"
- Text3.Text = ""
- Form1.Visible = 0
- Form4.Visible = 0
- Form5.Visible = 0
- Form5.Timer1.Enabled = False
- Form5.Line1.Visible = False
- Case "show"
- Text3.Text = ""
- Form4.Visible = 1
- Form5.Visible = 1
- If (Text1.Text = "") Then
- Form1.Hide
- Else
- Form1.Show
- End If
-
- Case "Start"
- If disfirst = 1 Then
- Form1.Text1 = ""
- Else
- disfirst = 1
- End If
- Form1.Visible = 1
- Form4.Visible = 1
- Form5.Visible = 1
- Case "AddStart" '进入增加词模式
- Form5.Line1.Visible = True
- Form5.Timer1.Enabled = True
- Case "AddEnd"
- Form5.Timer1.Enabled = False
- Form5.Line1.Visible = False
- End Select
- '得到传来的活动窗口
- If Val(Text3.Text) <> 0 Then
- act = Val(Text3.Text)
- End If
- End Sub
- '*********************************
- '以下为字母显示程序DilamicWin
- Sub myshow(ss As String)
- Dim i As Integer
- Dim d, t As Long
- If (DilamicWin.Runing = True) Then
- DilamicWin.ShowString ss
- Else
- For i = 1 To Len(ss)
- d = Mid(ss, i, 1)
- t = Asc(d) - 97
- DrawASCII 10 + 700 * (i - 1), 0, 700, 1000, t
- Next
- End If
- End Sub
- Sub DrawASCII(x As Long, y As Long, DesW As Long, DesH As Long, indxs As Long)
- If (indxs < 26 And indxs >= 0) Then
- basex = 30
- basey = -300
- ww = 1490
- Fontw = 1400
- Fonth = 3000
- Picture1.PaintPicture Picture2.Picture, x, y, DesW, DesH, indxs * ww + basex, basey, Fontw, Fonth, &HCC0020
- End If
- End Sub