www.pudn.com > 维文输入法源代码.rar > Form2.frm


VERSION 5.00 
Begin VB.Form Form2  
   BorderStyle     =   0  'None 
   Caption         =   "Form2" 
   ClientHeight    =   7215 
   ClientLeft      =   0 
   ClientTop       =   0 
   ClientWidth     =   9600 
   Icon            =   "Form2.frx":0000 
   LinkTopic       =   "Form2" 
   Picture         =   "Form2.frx":0442 
   ScaleHeight     =   7215 
   ScaleWidth      =   9600 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   3  '窗口缺省 
   Begin VB.Timer Timer1  
      Enabled         =   0   'False 
      Interval        =   3000 
      Left            =   2400 
      Top             =   3120 
   End 
End 
Attribute VB_Name = "Form2" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
Dim balga As Boolean 
Private Sub Form_Load() 
Dim k As String 
Dim cnt As Long 
Dim lll As Integer 
Dim dl As Long 
Dim cname As String 
Dim CurUser As String 
Dim s As String * 80 
Dim char1, char2 As String 
Dim syspath1, syspath2 As String 
Dim lenght As Long 
Dim char As String 
Dim omome As Integer 
Dim di As Long 
If Dir("c:\windows\fonts\jsw.ttf") = "" Then 
Call AddFontResource(App.Path + "\jsw.ttf") 
di = SendMessagebynum(HWND_BROADCAST, WM_FONTCHANGE, 0, 0) 
End If 
lenght = GetSystemDirectory(s, Len(s)) 
syspath1 = Left(s, lenght) + "\comm.ini" 
syspath2 = Left(s, lenght) + "\dit.est" 
cnt = 199 
k = String$(200, 0) 
dl = GetComputerName(k, cnt) 
 cname = Left(k, cnt) 
For lll = 1 To Len(cname) 
omome = omome + Asc(Mid(cname, lll, 1)) 
Next lll 
If mima = True Then 
    Open syspath1 For Output As #1 
    char = "@   computer user name is:" + cname + " verson is: 1.0   @" 
    Print #1, char 
    Close #1 
    Open syspath2 For Output As #1 
    char = omome 
    Print #1, char 
    Close #1 
Else 
If Dir(syspath1) = "" And Dir(syspath2) = "" Then 
 Form4.Show 
    Unload Me 
    Exit Sub 
End If 
End If 
If Dir(syspath1) <> "" And Dir(syspath2) <> "" Then 
    Open syspath1 For Input As #1 
    Input #1, char1 
    Close #1 
    Open syspath2 For Input As #1 
    Input #1, char2 
    Close #1 
        If char1 = "@   computer user name is:" + cname + " verson is: 1.0   @" And char2 = omome Then 
            GoTo alim 
        Else 
        If MsgBox("程序被破坏!请提供商联系.", vbOKOnly + 64, "JSW SOFT") = vbOK Then 
            End 
        End If 
        End If 
        Else 
        If MsgBox("程序被破坏!请提供商联系.", vbOKOnly + 64, "JSW SOFT") = vbOK Then 
            End 
        End If 
End If 
alim: 
Timer1.Enabled = True 
Form2.Move ((Screen.Width - Form2.Width) / 2), ((Screen.Height - Form2.Height) / 2) 
SetWindowPos hWnd, -1, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE 
balga = True 
End Sub 
Private Sub Timer1_Timer() 
If balga = False Then 
Unload Me 
     Load frm_Main 
     Timer1.Enabled = False 
   End If 
If balga = True Then balga = False 
End Sub