We help IT Professionals succeed at work.
Get Started

error vb6 postmessage usage

151 Views
Last Modified: 2020-02-05
listing in vb6 with errorTrying 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 itresponse helpdesk    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
Comment
Watch Question
CERTIFIED EXPERT
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE