jack niekerk
asked on
error vb6 postmessage usage
Trying to get some calls running in VB6 to use Postmessage Function
This is a call to the functions in a program wich now i can now only use bij shelling to commandline ,
like Shell "J:\VIRT_KEYBORD\MOVETOPKB ", vbHide
Utillity from https://hot-virtual-keyboard.com/
According their on-site manal should be possible to do like this
Const WM_CSKEYBOARD = &H400 + 192
Const WM_CSKEYBOARDMOVE = &H400 + 193
Const WM_CSKEYBOARDRESIZE = &H400 + 197
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, _
ByVal lParam As Integer) As Integer
'Move Hot Virtual Keyboard in Visual Basic; Move it first then show it Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) ' Handles Button3.Click
Dim hWnd As Integer
hWnd = FindWindow("TFirstForm", "hvkFirstForm")
PostMessage(hWnd, WM_CSKEYBOARDMOVE, 200, 200)
PostMessage(hWnd, WM_CSKEYBOARD, 1, 0)
End Sub
But calls to postmessga gives in Editor red syntax status
Support desk from supplier could not help me out on this
please see the attachd file from program listing and response helpdesk wich does not sove my problem
Thanks for help
This is a call to the functions in a program wich now i can now only use bij shelling to commandline ,
like Shell "J:\VIRT_KEYBORD\MOVETOPKB
Utillity from https://hot-virtual-keyboard.com/
According their on-site manal should be possible to do like this
Const WM_CSKEYBOARD = &H400 + 192
Const WM_CSKEYBOARDMOVE = &H400 + 193
Const WM_CSKEYBOARDRESIZE = &H400 + 197
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, _
ByVal lParam As Integer) As Integer
'Move Hot Virtual Keyboard in Visual Basic; Move it first then show it Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) ' Handles Button3.Click
Dim hWnd As Integer
hWnd = FindWindow("TFirstForm", "hvkFirstForm")
PostMessage(hWnd, WM_CSKEYBOARDMOVE, 200, 200)
PostMessage(hWnd, WM_CSKEYBOARD, 1, 0)
End Sub
But calls to postmessga gives in Editor red syntax status
Support desk from supplier could not help me out on this
please see the attachd file from program listing and response helpdesk wich does not sove my problem
Thanks for help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i forgot a part of the error see new posted reqeust pleaase
thanks
thanks
ASKER
to set it all to registry
ASKER
hello , i run in a other problem
all above runs perfect on windows 7 (tested on that one)
now running on the destenation station Windows-10 pro
all these routines give no error but also no effect
Case 1
'Open/show Hot Virtual Keyboard
hWndvirt = FindWindowb("TFirstForm", "hvkFirstForm")
Call PostMessage(hWndvirt, WM_CSKEYBOARD, 1, 0)
Case 2
'Move Hot Virtual Keyboard ; Move it first then show it
hWndvirt = FindWindowb("TFirstForm", "hvkFirstForm")
Call PostMessageb(hWndvirt, WM_CSKEYBOARDMOVE, 200, 650)
Call PostMessageb(hWndvirt, WM_CSKEYBOARD, 1, 0)
Looks like VB^on a Windows-10 situation
thus sofar al work for nothing
any idea???
regards jack
all above runs perfect on windows 7 (tested on that one)
now running on the destenation station Windows-10 pro
all these routines give no error but also no effect
Case 1
'Open/show Hot Virtual Keyboard
hWndvirt = FindWindowb("TFirstForm", "hvkFirstForm")
Call PostMessage(hWndvirt, WM_CSKEYBOARD, 1, 0)
Case 2
'Move Hot Virtual Keyboard ; Move it first then show it
hWndvirt = FindWindowb("TFirstForm", "hvkFirstForm")
Call PostMessageb(hWndvirt, WM_CSKEYBOARDMOVE, 200, 650)
Call PostMessageb(hWndvirt, WM_CSKEYBOARD, 1, 0)
Looks like VB^on a Windows-10 situation
thus sofar al work for nothing
any idea???
regards jack
hWndvirt = FindWindowb("TFirstForm", "hvkFirstForm")
sorry as I can't replicate and test it at my local. perhaps you should open a new question so other experts could assist?
ASKER
Thanks , best regards
ASKER
this did it
try put "Call" in front of the PostMessage?
regards Jack