PostMessage Problem
From: Ram (nav_ram_at_rediffmail.com)
Date: 01/24/05
- Next message: Daniele Barzotti: "Re: Change a TextBox Font"
- Previous message: Al: "Copying files from the CD using SHFileOperation API"
- Messages sorted by: [ date ] [ thread ]
Date: 23 Jan 2005 22:59:16 -0800
sir,
i am creating a software to type my regional language in windows
applications like word, pagemaker, coreldraw, quarkxpress etc. for that
i set a global keyboard hook to get the keyboard input and i
programatically change the pressed keys to my regional language
character and send back to the application using postmessage api. it
works smooth in some applications like pagemaker and word. but it fails
in quark and coreldraw.
in some applications i can't send 'vbkeyback'.
what is the problem with this code?
how can i postmessage to all applications without any problem.
plz help.....
below is my code:
Sub Send_Txt()
Cj = Conjuncts2(frmMain.Text1.Text)
Call PostMessage(frmMain.Timer1.Tag, WM_CHAR, vbKeyBack, Keybrd_Delay)
Call PostMessage(frmMain.Timer1.Tag, WM_CHAR, Asc(Cj), Keybrd_Delay)
End Sub
Private Sub Form_Load()
Keybrd_Delay = Val(GetSetting("LEO", "Teddy", "Software", "1"))
End Sub
'' To get foreground window handle...
Private Sub Timer1_Timer()
Dim hFore As Long, hFocus As Long
If hFocus = 0 Then
hFore = GetForegroundWindow()
Call AttachThreadInput(GetWindowThreadProcessId(hFore, 0&),
GetCurrentThreadId, True)
hFocus = GetFocus
Call AttachThreadInput(GetWindowThreadProcessId(hFore, 0&),
GetCurrentThreadId, False)
End If
Timer1.Tag = hFocus
End Sub
Sub Send_Txt()
Cj = Conjuncts2(frmMain.Text1.Text)
Call PostMessage(frmMain.Timer1.Tag, WM_CHAR, vbKeyBack, Keybrd_Delay)
Call PostMessage(frmMain.Timer1.Tag, WM_CHAR, Asc(Cj), Keybrd_Delay)
End Sub
plz help
ram
- Next message: Daniele Barzotti: "Re: Change a TextBox Font"
- Previous message: Al: "Copying files from the CD using SHFileOperation API"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|