uyghurvb يوللانغان ۋاقتى 2008-7-19 19:15:02

VB ئارقىلىق win98 غا ئۇيغۇرچە كىرگۈزۇش ئۇسۇلى قۇشۇش

Dim g As Long
Dim gul As Long
Dim hKey As Long

Private Sub Command2_Click(Index As Integer)


Select Case Index
Case 4


g = MsgBox("ÄãÕæµÄÍ˳öάÎÄƽ̨Âð£¿", 67, "¡°ÎÞÃûС×Ó¡±Èí¼þϵÁÐ")

If g = 6 Then


Call LoadKeyboardLayout("00000409", KLF_ACTIVATE)
Call UnloadKeyboardLayout(gul)
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\Locale", hKey
RegDeleteValue hKey, "00000420"
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\CodePage", hKey
RegDeleteValue hKey, "1256"
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Keyboard Layouts", hKey
RegDeleteKey hKey, "00000420"
RegCloseKey hKey
End

End If

Case 1

g = MsgBox("ÄãÕæµÄ½øÈëάÎÄƽ̨Âð£¿", 67, "¡°ÎÞÃûС×Ó¡±Èí¼þϵÁÐ")

If g = 6 Then

RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\Locale", hKey
RegSetValueEx hKey, "00000420", 0, REG_SZ, ByVal "άÎá¶ûÓï", 9
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\CodePage", hKey
RegSetValueEx hKey, "1256", 0, REG_SZ, ByVal "ÎÞÃûС×Ó", 9
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Keyboard Layouts\00000420", hKey
RegSetValueEx hKey, "layout file", 0, REG_SZ, ByVal "kbduy.kbd", 9
RegSetValueEx hKey, "layout id", 0, REG_SZ, ByVal "0028", 9
RegSetValueEx hKey, "layout text", 0, REG_SZ, ByVal "άÎá¶ûÓï", 9
RegCloseKey hKey
gul = LoadKeyboardLayout("00000420", KLF_ACTIVATE)
Else

Call LoadKeyboardLayout("00000409", KLF_ACTIVATE)
Call UnloadKeyboardLayout(gul)
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\Locale", hKey
RegDeleteValue hKey, "00000420"
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\CodePage", hKey
RegDeleteValue hKey, "1256"
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Keyboard Layouts", hKey
RegDeleteKey hKey, "00000420"
RegCloseKey hKey

End If

End Select

End Sub

Private Sub Command2_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
Dim a As Long
Dim p As POINTAPI
ClientToScreen Me.hwnd, p
p.X = CLng(X)
p.Y = CLng(Y)
Form1.Move Form1.Left + p.X, Form1.Top + p.Y

'SetWindowPos Form2.hwnd, -1, , , 150, 33, SwpNoActivate Or SwpShowWindow
End If

End Sub

Private Sub Form_Load()
frmLogin.Show 1
End Sub

Private Sub Form_Unload(Cancel As Integer)
Call LoadKeyboardLayout("00000409", KLF_ACTIVATE)
Call UnloadKeyboardLayout(gul)

Dim hKey As Long
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\Locale", hKey
RegDeleteValue hKey, "00000420"
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Nls\CodePage", hKey
RegDeleteValue hKey, "1256"
RegCreateKey HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Keyboard Layouts", hKey
RegDeleteKey hKey, "00000420"
RegCloseKey hKey
End Sub

Private Sub Timer1_Timer()
Command2(3).Caption = Time$
End Sub
Public Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Public Type POINTAPI
X As Long
Y As Long
End Type
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function LoadKeyboardLayout Lib "user32" Alias "LoadKeyboardLayoutA" (ByVal pwszKLID As String, ByVal flags As Long) As Long
Public Declare Function UnloadKeyboardLayout Lib "user32" (ByVal HKL As Long) As Long
Public Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Public Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long

Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const REG_SZ = 1 ' Unicode nul terminated string
Public Const KLF_ACTIVATE = &H1

SADAKAT0903 يوللانغان ۋاقتى 2008-7-22 11:04:07

ياخشى بەك بەلەن بوپتۇ!
بەت: [1]
: VB ئارقىلىق win98 غا ئۇيغۇرچە كىرگۈزۇش ئۇسۇلى قۇشۇش