VB6 0 detects whether the input method is turned on

Updated on technology 2024-02-08
10 answers
  1. Anonymous users2024-02-05

    private declare function immgetdescription lib "" _

    alias "immgetdescriptiona" (byval hkl as long, _

    byval lpsz as string, byval ubuflen as long) as long

    private declare function immisime lib "" (byval hkl as long) as long

    private declare function activatekeyboardlayout lib "user32" _

    byval hkl as long, byval flags as long) as long

    private declare function getkeyboardlayout lib "user32" (byval dwlayout as long) as long

    private sub form_load()

    msgbox getlayout, vbinformation, "Current input method"

    end sub

    function getlayout() as string

    dim buff as long

    getlayout = "English input method"

    buff = getkeyboardlayout(0) 'Get the current input method.

    if immisime(buff) = 1 then 'Chinese input method.

    getlayout = space(255)

    immgetdescription buff, getlayout, len(getlayout)

    end if

    end function

    To activate an input method, you can use activatekeyboardlayout

  2. Anonymous users2024-02-04

    The input method monitors the reason why it's not VB, you can't use the label control.

  3. Anonymous users2024-02-03

    Please check the input method.

    2.Please check the font settings of the text box.

  4. Anonymous users2024-02-02

    Install the sp6 patch.

    Set the system time zone to China.

    Set the default input method to Chinese input method.

    Try all 3 of them and there will always be one that will solve your problem.

  5. Anonymous users2024-02-01

    Check the handling of the keypress event, it may be that the double-byte character has been split.

  6. Anonymous users2024-01-31

    Cycle + sleep, control the cycle with some conditions, and strive for a high efficiency

    Embedding the compilation in the vb is a good note.

    There will be many methods, and other methods are based on discrete mathematics, I hope the landlord will think twice!

  7. Anonymous users2024-01-30

    Make another text box and set the visible property to. f.(Invisible), which records the text entered for the first time.

  8. Anonymous users2024-01-29

    Make use of functions or compare them one by one...

  9. Anonymous users2024-01-28

    private sub command1_click()if len(text1) <20 thenmsgbox "Only 20 digits can be entered"

    elseif left(text1, 3) <159 and left(text1, 3) <753 then

    msgbox "The first digit must be 159 or 753, please re-enter it"

    end if

    end sub

    private sub text1_keypress(keyascii as integer)

    if instr("0123456789", chr(keyascii)) = 0 then

    msgbox "False, only Arabic numerals from 0-9 can be entered"

    keyascii = 0

    end if

    end sub

  10. Anonymous users2024-01-27

    Judge with if then specific usage to ask Du Niang.

Related questions
14 answers2024-02-08

It's pretty big, but if you're a beginner, it's nothing, and it's going to change quickly at the beginning.