Dim hIMC As Long
Private Sub Form_Load()
Me.Label3.Caption = ""
Me.Text1.Text = ""
hIMC = ImmGetContext(Me.Text1.hWnd)
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call ImmReleaseContext(Me.Text1.hWnd, hIMC)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call ImmReleaseContext(Me.Text1.hWnd, hIMC)
End Sub
Private Sub Text1_Change()
Dim nSize As Long, temp As String
nSize = ImmGetCompositionString(hIMC, GCS_RESULTREADSTR, vbNullString, 0)
temp = String(nSize, Chr(0))
Call ImmGetCompositionString(hIMC, GCS_RESULTREADSTR, temp, Len(temp))
Me.Label3.Caption = temp
End Sub |